Local package module attribute not found in Streamlit but is found when running outside of it

Hey everyone!

Hope someone might help me, I am trying to run the FrugalML code found here GitHub - lchen001/FrugalML: This is the repository holding code and data for "FrugalML: How to Use ML Prediction APIs More Accurately and Cheaply". in Streamlit, locally. I have installed it in my venv using

pip install git+https://github.com/stanford-futuredata/FrugalGPT

If I run the jupyter notebook intro.ipynb, the package attribute LLMForAll causes no issues, but if I try to call it in my Streamlit app, it gives me this error

AttributeError: module ‘FrugalGPT’ has no attribute ‘LLMforAll’

My Streamlit version is 1.28.0

Does anyone know what the issue might be?

Thanks!
Tia

Did you activate the venv before you called streamlit from it?

Thanks @Franky1 yes I have :slight_smile: