I have created the following that prototypes a system to enable blind people to see. The link for the app is: vision-for-the-blind.streamlit.app
When I am testing my app locally the pyttsx3 library is working just fine however, when I upload the same code to the streamlit server via my github repo, I am getting the following error:
It seems that the error pertains to not being able to access model_response.wav file. Perhaps you can try using the NamedTemporaryFile method from the tempfile library to store the generated audio file tempfile — Generate temporary files and directories — Python 3.12.4 documentation which can then be used subsequently in the script.
Hi, in this same app I’m facing another error. When I’m running my app locally its working just fine but when running my website I’m consistently running into this same error and I don’t know how to resolve it. It’s as follows:
/home/adminuser/venv/lib/python3.11/site-packages/transformers/models/whisper/generation_whisper.py:496: FutureWarning: The input name `inputs` is deprecated. Please make sure to use `input_features` instead.
warnings.warn(
The attention mask is not set and cannot be inferred from input because pad token is same as eos token. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.
/home/adminuser/venv/lib/python3.11/site-packages/pydantic/_internal/_config.py:341: UserWarning: Valid config keys have changed in V2:
* 'allow_population_by_field_name' has been renamed to 'populate_by_name'
* 'smart_union' has been removed
warnings.warn(message, UserWarning)
/home/adminuser/venv/lib/python3.11/site-packages/pydantic/_internal/_fields.py:161: UserWarning: Field "model_id" has conflict with protected namespace "model_".
You may be able to resolve this warning by setting `model_config['protected_namespaces'] = ()`.
warnings.warn(
[19:10:34] ❗️ The service has encountered an error while checking the health of the Streamlit app: Get "http://localhost:8501/healthz": read tcp 127.0.0.1:57490->127.0.0.1:8501: read: connection reset by peer
/app/scripts/run-streamlit.sh: line 9: 2294 Killed sudo -E -u appuser /home/adminuser/venv/bin/streamlit "$@"
[19:12:09] ❗️ Streamlit server consistently failed status checks
[19:12:09] ❗️ Please fix the errors, push an update to the git repo, or reboot the app.
I think the error that I’m facing is because of the ASR model I’m using to convert the user audio input into text. The code for it is as follows:
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
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.
Performance cookies
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.
Functional cookies
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.
Targeting cookies
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.