Spaces:
Runtime error
Runtime error
File size: 1,566 Bytes
dda35dd |
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 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
#!/bin/bash
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 |