Spaces:
Runtime error
Runtime error
| echo "ποΈ Enhanced Concrete Creep Prediction App - Startup Script" | |
| echo "==========================================================" | |
| # Check if Python is installed | |
| if ! command -v python &> /dev/null; then | |
| echo "β Python is not installed. Please install Python 3.8 or higher." | |
| exit 1 | |
| fi | |
| # Check Python version | |
| PYTHON_VERSION=$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))') | |
| echo "π Python version: $PYTHON_VERSION" | |
| # Check if pip is installed | |
| if ! command -v pip &> /dev/null; then | |
| echo "β pip is not installed. Please install pip." | |
| exit 1 | |
| fi | |
| # Install dependencies | |
| echo "π¦ Installing dependencies..." | |
| pip install -r requirements.txt | |
| if [ $? -ne 0 ]; then | |
| echo "β Failed to install dependencies. Please check requirements.txt" | |
| exit 1 | |
| fi | |
| echo "β Dependencies installed successfully!" | |
| # Check if model files exist | |
| if [ ! -f "best_llm_model-17.pt" ] && [ ! -f "final_llm_model-5.pt" ]; then | |
| echo "β No model files found. Please ensure model files are present." | |
| exit 1 | |
| fi | |
| # Check if scalers directory exists | |
| if [ ! -d "scalers" ]; then | |
| echo "β Scalers directory not found. Please ensure scalers directory is present." | |
| exit 1 | |
| fi | |
| echo "β All files verified!" | |
| echo "π Starting Streamlit app..." | |
| echo "" | |
| echo "The app will be available at:" | |
| echo " Local URL: http://localhost:8501" | |
| echo " Network URL: http://$(hostname -I | awk '{print $1}'):8501" | |
| echo "" | |
| echo "Press Ctrl+C to stop the application" | |
| echo "" | |
| # Start the Streamlit app | |
| streamlit run app.py |