Spaces:
Sleeping
Sleeping
Update DEPLOYMENT.md
Browse files- DEPLOYMENT.md +20 -12
DEPLOYMENT.md
CHANGED
|
@@ -11,9 +11,9 @@
|
|
| 11 |
- [x] `.gitignore` - Clean repository
|
| 12 |
|
| 13 |
### 2. File Names (Critical for Hugging Face)
|
| 14 |
-
- [x] **Main app file**: `app.py` (
|
| 15 |
-
- [x] **Dependencies**: `requirements.txt`
|
| 16 |
-
- [x] **Documentation**: `README.md`
|
| 17 |
|
| 18 |
### 3. Code Verification
|
| 19 |
- [x] App imports successfully
|
|
@@ -32,14 +32,22 @@
|
|
| 32 |
6. Click "Create Space"
|
| 33 |
|
| 34 |
### Step 2: Upload Files
|
| 35 |
-
|
| 36 |
1. `app.py` (main application)
|
| 37 |
-
2. `
|
| 38 |
-
3. `
|
| 39 |
-
4. `
|
| 40 |
-
5. `
|
| 41 |
|
| 42 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
1. Check that the Space shows "Building" status
|
| 44 |
2. Wait for build to complete (usually 2-5 minutes)
|
| 45 |
3. Verify the app loads without "No application file found" error
|
|
@@ -51,10 +59,10 @@ Upload these files in this exact order:
|
|
| 51 |
**Solution**: Ensure `app.py` is the main file (not `start_app.py`)
|
| 52 |
|
| 53 |
### Issue: Build fails
|
| 54 |
-
**Solution**:
|
| 55 |
|
| 56 |
-
### Issue: App loads but
|
| 57 |
-
**Solution**:
|
| 58 |
|
| 59 |
### Issue: Images not downloading
|
| 60 |
**Solution**: Verify `photos_url.csv` is present and accessible
|
|
|
|
| 11 |
- [x] `.gitignore` - Clean repository
|
| 12 |
|
| 13 |
### 2. File Names (Critical for Hugging Face)
|
| 14 |
+
- [x] **Main app file**: `app.py` (entry point at repo root)
|
| 15 |
+
- [x] **Dependencies**: `requirements.txt`
|
| 16 |
+
- [x] **Documentation**: `README.md` (contains HF Spaces metadata header)
|
| 17 |
|
| 18 |
### 3. Code Verification
|
| 19 |
- [x] App imports successfully
|
|
|
|
| 32 |
6. Click "Create Space"
|
| 33 |
|
| 34 |
### Step 2: Upload Files
|
| 35 |
+
Include at minimum:
|
| 36 |
1. `app.py` (main application)
|
| 37 |
+
2. `photos_url.csv` (dataset of image URLs)
|
| 38 |
+
3. `requirements.txt` (dependencies)
|
| 39 |
+
4. `README.md` (metadata + documentation)
|
| 40 |
+
5. Optional: `download_images.py` (standalone utility)
|
| 41 |
|
| 42 |
+
Note: For Streamlit Spaces you do not need a custom Dockerfile; the platform runs `app.py` based on the README metadata.
|
| 43 |
+
|
| 44 |
+
### Step 3: Configure Secrets (Optional for Text Search)
|
| 45 |
+
If you want text search powered by `openai/clip-vit-base-patch32` via the Inference API:
|
| 46 |
+
1. Go to Space → Settings → Secrets
|
| 47 |
+
2. Add secret key: `HF_TOKEN` with your Hugging Face token value
|
| 48 |
+
3. Save
|
| 49 |
+
|
| 50 |
+
### Step 4: Verify Deployment
|
| 51 |
1. Check that the Space shows "Building" status
|
| 52 |
2. Wait for build to complete (usually 2-5 minutes)
|
| 53 |
3. Verify the app loads without "No application file found" error
|
|
|
|
| 59 |
**Solution**: Ensure `app.py` is the main file (not `start_app.py`)
|
| 60 |
|
| 61 |
### Issue: Build fails
|
| 62 |
+
**Solution**: Ensure `app.py` and `requirements.txt` exist at repo root and the README has the metadata header
|
| 63 |
|
| 64 |
+
### Issue: App loads but text search is disabled
|
| 65 |
+
**Solution**: Add `HF_TOKEN` secret to the Space. Image upload search works without it.
|
| 66 |
|
| 67 |
### Issue: Images not downloading
|
| 68 |
**Solution**: Verify `photos_url.csv` is present and accessible
|