Streamlit more lit to deply my app

Welcome .
I built my app on streamlit but it took over 10 hours to boot up and it’s still stuck .

its let more than 10 hours

plz, Please reply as soon as possible and solve the problem

Hi @stujazan :wave:

The issue is not with Streamlit Cloud. You are attempting to deploy a Flask app rather than a Streamlit app.

You can solve the problem by deploying a Streamlit app instead.

Best, :balloon:
Snehan

If this is the app you’re referring to, it looks like it has successfully deployed: https://share.streamlit.io/stujazan/streamlit/main/app.py

hi @snehankekre

ok , But I deply bu stream app

And I followed these steps exactly

What app are you specifically referring to? The instructions in our docs are meant for Streamlit apps.

no no @snehankekre

this url my app
https://share.streamlit.io/stujazan/heart_prediction/main/app.py

Exactly. That is a Flask app, not a Streamlit app. Therefore, it does not run on Streamlit Cloud.

thank you @snehankekre

but plz can you tell my how i can create and run me app

what is steps

thank you agian

You’ve already done so yourself in the past:

Use your previous Streamlit app as template, remove Flask specific commands, and replace them with Streamlit commands. You can use the following guide as a reference:

thaaaaaaaaaaaaaaaank you my bro …
Use your previous app as template, remove Flask specific commands, and replace them with Streamlit commands. You can use the following guide as a reference:

You’re most welcome :smile:

hi @snehankekre
I did what you told me, but I got this error :
(

TypeError: Descriptors cannot not be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
 1. Downgrade the protobuf package to 3.20.x or lower.
 2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).

More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates
[11:35:08] ❗️ error restarting streamlit: exit status 7: output: streamlit: ERROR (not running)
streamlit: ERROR (spawn error) ) 

How can I fix this error plz

Ah yes, sorry about that! The solution is to include protobuf~=3.19.0 in your requirements.txt file:

okay i add that now and i tell you

thank

Hi @snehankekre

thank you nfor your time .
but I added everything you said.

And I have new error


how can sove that plz

that errors

/home/appuser/venv/lib/python3.9/site-packages/sklearn/base.py:310: UserWarning: Trying to unpickle estimator RandomForestClassifier from version 0.23.2 when using version 0.24.1. This might lead to breaking code or invalid results. Use at your own risk.
  warnings.warn(
2022-05-26 12:08:23.536 Uncaught app exception
Traceback (most recent call last):
  File "/home/appuser/venv/lib/python3.9/site-packages/streamlit/scriptrunner/script_runner.py", line 475, in _run_script
    exec(code, module.__dict__)
  File "/app/heart_prediction/app.py", line 11, in <module>
    app = Flask(__name__)
NameError: name 'Flask' is not defined

Hi @stujazan -

I feel like you’re missing what @snehankekre is trying to tell you here. Streamlit and Flask are two different projects for serving web apps. If you are trying to deploy a Flask app on Streamlit Cloud, it isn’t going to work.

Additionally, the packages themselves aren’t designed to work together from the same Python process. You can run Flask somewhere, then call it from Streamlit, but you can’t display Streamlit widgets inside of a Flask app.

Best,
Randy