Spaces:
Running
Running
| # Determine which version of the app to run | |
| if [ "$1" == "educational" ]; then | |
| APP_FILE="streamlit_app.py" | |
| echo "Starting Educational Version..." | |
| else | |
| APP_FILE="app.py" | |
| echo "Starting Standard Version..." | |
| fi | |
| # Check if .env file exists and load it | |
| if [ -f .env ]; then | |
| echo "Loading environment variables from .env file" | |
| export $(grep -v '^#' .env | xargs) | |
| fi | |
| # Check if the Mistral API key is set | |
| if [ -z "${MISTRAL_API_KEY}" ]; then | |
| echo "Warning: MISTRAL_API_KEY environment variable is not set." | |
| echo "The application will run in demo mode with limited functionality." | |
| fi | |
| # Start the Streamlit app | |
| streamlit run $APP_FILE --server.maxUploadSize=50 --server.enableCORS=false --server.enableXsrfProtection=false |