Spaces:
Sleeping
Sleeping
Update start.sh
Browse files
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
|
| 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 |
-
#
|
| 13 |
echo "Starting Streamlit frontend..."
|
| 14 |
-
streamlit run streamlit_app.py
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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
|