Unable to deploy

HI,

I am trying to deploy Streamlit app.
It did not work. See error message as screen shot


github link

I worked earlier but wasnt working now.

Can you clarify where it worked? Locally or on Streamlit Cloud.

From the looks of the repo, you don’t have a requirements file on the same level as your Streamlit app, so I would guess that your package dependencies aren’t being installed.

Best,
Randy

The requirement file is in the Github under a folder called WorkFolder_Igor

Yes, it worked locally.

It also worked earlier before my code DOES NOT have tensorflow.

Based on your error message, it appears that you are deploying this python file:

If so, you need to have your requirements file at the top-level of your repo; Streamlit Cloud will try to find your file, but it starts in the directory where the app code is and goes UP the directory tree. So in this case, your app is at the top-level, which means your requirements need to as well.

Best,
Randy

1 Like

Hi Randy,

I moved requirement to the front page. Tried it again to deploy on Streamlit but got the following error.

1 Like

Hi @hahahazel,

I’ve tried deploying your app and to solve the Error installing requirements error (which has trouble compiling PyAudio), you can create a new text file called packages.txt and inside the file add portaudio19-dev. What this will do is perform sudo apt install portaudio19-dev. This should allow all of your libraries to be compiled and installed successfully.

However, with the above error solved, a new error arises from TensorFlow

and it is rather difficult to dissect the problem given the intertwined nature of the code.

I would recommend to slowly add your implementation using TensorFlow into your Streamlit app so that it will be easier for you to debug issues.

Hope this helps :slight_smile:

Hi,

Thank you so much for responding. I did the step you mentioned about packages.txt
Could you kindly walk me thru “I would recommend to slowly add your implementation using TensorFlow into your Streamlit app so that it will be easier for you to debug issues.”

you mean the code has to be changed in order to deploy public?

Locally, it works

Hazel


Hi, let’s say that you’re app has 10 steps that it performs. Try deploying only step 1 as an app, it that works then incrementally add to it (steps 1 and 2, and if that works then try steps 1-3, etc.).

That way you can see at which step does the error lie.

Or you can also read through the error log shown at the right hand side.

Hi,

Thank you for your advice.

My Step 1 is taking out all the code , only leaving text ‘Welcome to our project’ in VS Code , it still won’t run.

It said the problem is with tensorflow. Is tensorflow package not available in Streamlit? How should I proceed?

Please advice.

Source code: https://github.com/hahahazel/DRS28_Hazel_n_Igor_portfolio_project/blob/main/streamlit_app.py

Thank you.