Spaces:
Runtime error
Runtime error
File size: 1,412 Bytes
bd04035 d6145e3 bd04035 d6145e3 bd04035 d6145e3 bd04035 d6145e3 bd04035 d6145e3 bd04035 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | #!/bin/bash
echo "===== Application Startup at $(date) ====="
echo ""
echo "π¬ MediVision - AI-Powered Radiology Report System"
echo "=================================================="
# Check current directory and list files
echo "π Current directory: $(pwd)"
echo "π Available files:"
ls -la /app/
# Check if argument provided
if [ "$1" = "streamlit" ]; then
echo "π Starting with Streamlit..."
cd /app/backend && uvicorn service:app --host 0.0.0.0 --port 8001 &
BACKEND_PID=$!
echo "π§ Backend started with PID: $BACKEND_PID"
sleep 2
cd /app && streamlit run streamlit_app.py --server.port 8501 --server.address 0.0.0.0 --server.enableXsrfProtection=false
elif [ "$1" = "gradio" ]; then
echo "π Starting with Gradio..."
cd /app/backend && uvicorn service:app --host 0.0.0.0 --port 8001 &
BACKEND_PID=$!
echo "π§ Backend started with PID: $BACKEND_PID"
sleep 3
echo "π Starting Gradio frontend..."
cd /app && python gradio_app.py
else
echo "π Starting with Gradio (default)..."
cd /app/backend && uvicorn service:app --host 0.0.0.0 --port 8001 &
BACKEND_PID=$!
echo "π§ Backend started with PID: $BACKEND_PID"
sleep 3
echo "π Starting Gradio frontend..."
cd /app
echo "π About to run: python gradio_app.py"
echo "π Files in current directory:"
ls -la
python gradio_app.py
fi
|