ShutterStack commited on
Commit
5e84499
·
verified ·
1 Parent(s): dda65aa

Update start.sh

Browse files
Files changed (1) hide show
  1. start.sh +4 -7
start.sh CHANGED
@@ -1,20 +1,17 @@
1
  #!/bin/bash
2
 
3
  # Start Flask backend using Gunicorn in the background
4
- # Make sure main.py is in flask_backend/ and you reference it correctly.
5
- # The `wsgi:app` assumes your Flask app instance is named `app` in `wsgi.py` (common Gunicorn setup)
6
- # or you can point directly to `main:app` if `app` is defined in main.py.
7
- # Based on your main.py, it's `main:app`.
8
  echo "Starting Flask backend..."
9
- gunicorn flask_backend.main:app --workers 1 --bind 0.0.0.0:5000 --timeout 600 --log-level debug &
10
 
11
  # Wait a bit for Flask to start (optional, but can help prevent connection errors)
12
  sleep 5
13
 
14
  # Start Streamlit frontend in the background
15
- # Make sure streamlit_app.py is in streamlit_frontend/
16
  echo "Starting Streamlit frontend..."
17
- streamlit run streamlit_frontend/streamlit_app.py --server.port 8501 --server.enableCORS false --server.enableXsrfProtection false --server.fileWatcherType none &
18
 
19
  # Wait a bit for Streamlit to start (optional)
20
  sleep 5
 
1
  #!/bin/bash
2
 
3
  # Start Flask backend using Gunicorn in the background
4
+ # Your main.py is at the root, so reference it directly.
 
 
 
5
  echo "Starting Flask backend..."
6
+ gunicorn main:app --workers 1 --bind 0.0.0.0:5000 --timeout 600 --log-level debug &
7
 
8
  # Wait a bit for Flask to start (optional, but can help prevent connection errors)
9
  sleep 5
10
 
11
  # Start Streamlit frontend in the background
12
+ # Your streamlit_app.py is at the root, so reference it directly.
13
  echo "Starting Streamlit frontend..."
14
+ streamlit run streamlit_app.py --server.port 8501 --server.enableCORS false --server.enableXsrfProtection false --server.fileWatcherType none &
15
 
16
  # Wait a bit for Streamlit to start (optional)
17
  sleep 5