#!/bin/bash # entrypoint.sh for Hugging Face Spaces export MLFLOW_ALLOW_FILE_STORE=true echo "Configuring DVC authentication..." dvc remote modify origin --local auth basic dvc remote modify origin --local user SadeepSachintha dvc remote modify origin --local password $DAGSHUB_USER_TOKEN echo "Pulling data from DVC..." dvc pull --force echo "Fixing MLflow absolute paths for cloud deployment..." find mlruns \( -name "meta.yaml" -o -name "MLmodel" \) -exec sed -i 's|file:.*mlruns|file:///app/mlruns|g' {} + # Start FastAPI in the background uvicorn src.models.api:app --host 0.0.0.0 --port 8000 & # Start Streamlit in the foreground on port 7860 streamlit run src/models/dashboard.py --server.port 7860 --server.address 0.0.0.0