Spaces:
Sleeping
Sleeping
Download Makefile from ubern-introimage/colorspaces: direct link, hf CLI and curl.
- Browser
- Download file 2.2 kB
-
https://huggingface.co/spaces/ubern-introimage/colorspaces/resolve/main/Makefile
- Command line
-
hf download hf://spaces/ubern-introimage/colorspaces/Makefile
-
curl -L -o Makefile https://huggingface.co/spaces/ubern-introimage/colorspaces/resolve/main/Makefile
2.2 kB
| .PHONY: help setup install run clean deploy status test | |
| help: | |
| @echo "π¨ Colorspace Explorer - Available Commands:" | |
| @echo "" | |
| @echo " make setup - Set up virtual environment and install dependencies" | |
| @echo " make install - Install/update dependencies only" | |
| @echo " make run - Run the Streamlit app locally" | |
| @echo " make clean - Remove virtual environment and cache files" | |
| @echo " make deploy - Deploy to Hugging Face Spaces" | |
| @echo " make status - Check deployment status" | |
| @echo " make test - Run basic tests (if any)" | |
| @echo "" | |
| setup: | |
| @echo "π§ Setting up environment..." | |
| @if [ ! -d "venv" ]; then \ | |
| echo "Creating virtual environment..."; \ | |
| python3 -m venv venv; \ | |
| fi | |
| @echo "Installing dependencies..." | |
| @. venv/bin/activate && pip install --upgrade pip | |
| @. venv/bin/activate && pip install -r requirements.txt | |
| @echo "β Setup complete!" | |
| @echo "" | |
| @echo "To run the app, use: make run" | |
| install: | |
| @echo "π₯ Installing dependencies..." | |
| @if [ ! -d "venv" ]; then \ | |
| echo "β Virtual environment not found. Run 'make setup' first."; \ | |
| exit 1; \ | |
| fi | |
| @. venv/bin/activate && pip install -r requirements.txt | |
| @echo "β Dependencies installed" | |
| run: | |
| @echo "π Starting Streamlit app..." | |
| @if [ ! -d "venv" ]; then \ | |
| echo "β Virtual environment not found. Run 'make setup' first."; \ | |
| exit 1; \ | |
| fi | |
| @. venv/bin/activate && streamlit run app.py | |
| clean: | |
| @echo "π§Ή Cleaning up..." | |
| @rm -rf venv | |
| @rm -rf __pycache__ | |
| @rm -rf .streamlit | |
| @find . -type d -name "*.egg-info" -exec rm -rf {} + 2>/dev/null || true | |
| @find . -type f -name "*.pyc" -delete | |
| @echo "β Cleanup complete" | |
| deploy: | |
| @echo "π Deploying to Hugging Face Spaces..." | |
| @if [ ! -f "deploy.sh" ]; then \ | |
| echo "β deploy.sh not found. Creating it..."; \ | |
| chmod +x deploy.sh; \ | |
| fi | |
| @./deploy.sh | |
| status: | |
| @echo "π Checking deployment status..." | |
| @if [ ! -f "check_status.sh" ]; then \ | |
| echo "β check_status.sh not found."; \ | |
| exit 1; \ | |
| fi | |
| @./check_status.sh | |
| test: | |
| @echo "π§ͺ Running tests..." | |
| @if [ ! -d "venv" ]; then \ | |
| echo "β Virtual environment not found. Run 'make setup' first."; \ | |
| exit 1; \ | |
| fi | |
| @. venv/bin/activate && python test_setup.py | |