Download run.sh from ubern-introimage/sampling-quantization: direct link, hf CLI and curl.
- Browser
- Download file 788 Bytes
-
https://huggingface.co/spaces/ubern-introimage/sampling-quantization/resolve/main/run.sh
- Command line
-
hf download hf://spaces/ubern-introimage/sampling-quantization/run.sh
-
curl -L -o run.sh https://huggingface.co/spaces/ubern-introimage/sampling-quantization/resolve/main/run.sh
788 Bytes
| # Simple script to run the Streamlit app locally | |
| echo "π¨ Starting Image Sampling and Quantization Demo..." | |
| echo "" | |
| # Check if virtual environment exists | |
| if [ ! -d "venv" ]; then | |
| echo "π¦ No virtual environment found. Creating one..." | |
| python3 -m venv venv | |
| fi | |
| # Activate virtual environment | |
| echo "π§ Activating virtual environment..." | |
| source venv/bin/activate | |
| # Install requirements if needed | |
| if [ ! -f "venv/.requirements_installed" ]; then | |
| echo "π₯ Installing dependencies..." | |
| pip install -r requirements.txt | |
| touch venv/.requirements_installed | |
| else | |
| echo "β Dependencies already installed" | |
| fi | |
| # Run the app | |
| echo "" | |
| echo "π Launching Streamlit app..." | |
| echo " Open your browser to http://localhost:8501" | |
| echo "" | |
| streamlit run app.py | |