edge-detection / Makefile
AKA Math
Update demo
dead0ef
Raw
History Blame Contribute Delete
1.62 kB
.PHONY: help setup install run clean deploy test
help:
@echo "πŸ” Edge Detection Demo - 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 test - Run basic tests"
@echo ""
setup:
@echo "πŸ”§ Setting up environment..."
@./setup.sh
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..."
@./deploy.sh
test:
@echo "πŸ§ͺ Running basic import tests..."
@if [ ! -d "venv" ]; then \
echo "❌ Virtual environment not found. Run 'make setup' first."; \
exit 1; \
fi
@. venv/bin/activate && python -c "import app; print('βœ… App imports successfully')"
@echo "βœ… Basic tests passed"