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
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
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,
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
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
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
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
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.