My app stops running and displays a vague error message

My app stops running and displays a vague error message. It can stop at any time and anywhere during the execution of the code without providing a clear explanation. The only option is to rerun it after a reboot. Interestingly, the same app runs successfully without any errors when executed from GitHub Codespaces. I would greatly appreciate it if any member of the forum could help identify the problem and provide a solution. Required links/information are listed below:-

  1. The link to the public app (deployed on Community Cloud):
    https://text-summarizer-app-umarsb61.streamlit.app/
  2. The links app’s public GitHub repository (including a requirements file):
    GitHub - UmarSaleem61/text-summarizer-app: This app summarizes user-uploaded text files (TXT, DOCX, or PDF). It generates a concise summary using the Generative-AI LLM model: facebook/bart-large-cnn. The summary can be downloaded in TXT, DOCX, or PDF format. The app was designed and implemented with the assistance of ChatGPT. The app is deployed on Streamlit.
    text-summarizer-app/.devcontainer at main · UmarSaleem61/text-summarizer-app · GitHub
    text-summarizer-app/app.py at main · UmarSaleem61/text-summarizer-app · GitHub
    text-summarizer-app/requirements.txt at main · UmarSaleem61/text-summarizer-app · GitHub
  3. Full text of the error message (not a screenshot):
    Oh no. Error running app. If you need help, try the Streamlit docs and forums.
    (Streamlit Log is also available but I don’t know how to attach it)
  4. The Streamlit and Python versions:
    Streamlit version: 1.41.1
    Python version: 3.12.8

You can copy-paste the Streamlit log as formatted code

Your issue is likely related to either memory limits or compatibility problems. First, check the Streamlit logs for any specific errors, especially related to memory or timeouts, as this could help narrow things down. The model you’re using facebook/bart-large-cnn, is quite heav so it could be running out of memory on Streamlit’s free tier. Try optimizing memory usage or switching to a smaller model to see if that makes a difference. Make sure the Python and Streamlit versions in your deployment match your local setup If you’re using Python 3.12.8, try downgrading to 3.10 or 3.11 to check for compatibility issues.

Thanks, I will try.

Thanks for detailed suggestions.

1 Like