Spaces:
Sleeping
Sleeping
File size: 2,761 Bytes
c7e9899 7500864 c7e9899 7500864 c7e9899 7500864 c7e9899 7500864 c7e9899 7500864 c7e9899 7500864 c7e9899 | 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 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 | # 🚀 Quick Start Guide
## First Time Setup
1. **Run the setup script:**
```bash
./setup.sh
```
This will:
- Check Python version (3.11+ required)
- Install uv package manager if needed
- Install all dependencies
- Set script permissions
## Running the App
### Option 1: Shell Script (Recommended)
```bash
./run_local.sh
```
### Option 2: Simple Script (Alternative)
If you encounter build issues, use the simpler version:
```bash
./run_simple.sh
```
### Option 3: Make Command
```bash
make run
```
### Option 4: Direct Command
```bash
uv run --no-build-isolation streamlit run app.py
```
The app will open in your browser at `http://localhost:8501`
## Deploying to GitHub & HuggingFace Spaces
The deploy script now pushes to **both** GitHub and HuggingFace Spaces automatically.
### Option 1: Shell Script (Recommended)
```bash
./deploy.sh
```
### Option 2: Make Command
```bash
make deploy
```
The script will:
- Check for uncommitted changes
- Prompt you to commit if needed
- Push to GitHub (origin remote)
- Push to HuggingFace Spaces (hf remote)
- Show links to both deployed versions
**Note:** If you don't have the HuggingFace remote configured, the script will show you how to add it:
```bash
git remote add hf https://huggingface.co/spaces/amithjkamath/template-matching
```
## Troubleshooting
### "Build backend error" or hatchling issues
The project is now configured to skip the build step. If you still see build errors:
```bash
./run_simple.sh
# or
uv pip install -r requirements.txt
uv run streamlit run app.py
```
### "Module not found" error
```bash
uv sync --no-build-isolation
# or
uv pip install -r requirements.txt
```
### Port 8501 already in use
```bash
uv run --no-build-isolation streamlit run app.py --server.port 8502
```
### Script permission denied
```bash
chmod +x setup.sh run_local.sh run_simple.sh deploy.sh
```
## Available Commands
Run `make help` to see all available commands:
```bash
make help # Show all commands
make setup # Initial setup
make install # Install dependencies
make run # Run locally
make deploy # Deploy to GitHub & HuggingFace
make status # Check repository sync status
make clean # Clean cache files
make update # Update dependencies
make info # Show project info
```
## Checking Sync Status
Before deploying, you can check if your local repository is in sync with GitHub and HuggingFace:
```bash
./check_status.sh
# or
make status
```
This will show:
- Current branch and uncommitted changes
- Sync status with GitHub (origin)
- Sync status with HuggingFace Spaces (hf)
- Recent commits
- Quick action commands
## Need Help?
See [CONTRIBUTING.md](CONTRIBUTING.md) for detailed documentation.
|