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

Update start.sh

Browse files
Files changed (1) hide show
  1. start.sh +7 -3
start.sh CHANGED
@@ -1,7 +1,7 @@
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
 
@@ -9,9 +9,13 @@ gunicorn main:app --workers 1 --bind 0.0.0.0:5000 --timeout 600 --log-level debu
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
 
1
  #!/bin/bash
2
 
3
  # Start Flask backend using Gunicorn in the background
4
+ # Your main.py is at the root, so reference it correctly.
5
  echo "Starting Flask backend..."
6
  gunicorn main:app --workers 1 --bind 0.0.0.0:5000 --timeout 600 --log-level debug &
7
 
 
9
  sleep 5
10
 
11
  # Start Streamlit frontend in the background
12
+ # Ensure these flags are set for Streamlit to handle file uploads correctly in a proxied environment.
13
  echo "Starting Streamlit frontend..."
14
+ streamlit run streamlit_app.py \
15
+ --server.port 8501 \
16
+ --server.enableCORS false \
17
+ --server.enableXsrfProtection false \
18
+ --server.fileWatcherType none & # Keep this for faster restarts if you have it
19
 
20
  # Wait a bit for Streamlit to start (optional)
21
  sleep 5