Spaces:
Configuration error
Configuration error
Update README.md
Browse files
README.md
CHANGED
|
@@ -8,66 +8,4 @@ sdk_version: "4.31.5"
|
|
| 8 |
python_version: "3.10"
|
| 9 |
app_file: app.py
|
| 10 |
pinned: false
|
| 11 |
-
---# StreamSmart Recommender - Hugging Face Space with 2 n8n workflows
|
| 12 |
|
| 13 |
-
Files included:
|
| 14 |
-
- `app.py` - main Gradio app for Hugging Face Space
|
| 15 |
-
- `requirements.txt` - Python dependencies
|
| 16 |
-
- `n8n_processing_workflow.json` - import into n8n for full-result intake
|
| 17 |
-
- `n8n_report_workflow.json` - import into n8n for top-recommendation reporting
|
| 18 |
-
|
| 19 |
-
## 1) Hugging Face setup
|
| 20 |
-
Create a new **Gradio Space** and replace the default files with:
|
| 21 |
-
- `app.py`
|
| 22 |
-
- `requirements.txt`
|
| 23 |
-
|
| 24 |
-
Add these Space secrets:
|
| 25 |
-
- `N8N_PROCESS_WEBHOOK_URL` = your production URL from the processing workflow
|
| 26 |
-
- `N8N_REPORT_WEBHOOK_URL` = your production URL from the report workflow
|
| 27 |
-
|
| 28 |
-
## 2) CSV formats
|
| 29 |
-
### Reviews CSV required columns
|
| 30 |
-
- `title`
|
| 31 |
-
- `review_text`
|
| 32 |
-
|
| 33 |
-
Optional:
|
| 34 |
-
- `genre`
|
| 35 |
-
- `rating`
|
| 36 |
-
- `user_segment`
|
| 37 |
-
|
| 38 |
-
### Watch-time CSV required columns
|
| 39 |
-
- `title`
|
| 40 |
-
- `genre`
|
| 41 |
-
- `avg_watch_time`
|
| 42 |
-
- `completion_rate`
|
| 43 |
-
- `drop_off_rate`
|
| 44 |
-
- `rewatch_rate`
|
| 45 |
-
- `click_through_rate`
|
| 46 |
-
|
| 47 |
-
Rates should be decimals such as `0.82`, not percentages like `82%`.
|
| 48 |
-
|
| 49 |
-
## 3) n8n setup
|
| 50 |
-
In n8n:
|
| 51 |
-
1. Import `n8n_processing_workflow.json`
|
| 52 |
-
2. Import `n8n_report_workflow.json`
|
| 53 |
-
3. Open each Webhook node and copy the **Production URL**
|
| 54 |
-
4. Paste those URLs into the two Hugging Face Space secrets above
|
| 55 |
-
5. Rebuild the Space
|
| 56 |
-
|
| 57 |
-
## 4) What each workflow does
|
| 58 |
-
### Processing workflow
|
| 59 |
-
- receives the full scored dataset from the app
|
| 60 |
-
- counts how many titles fall into each action category
|
| 61 |
-
- returns the top title and a short status message
|
| 62 |
-
|
| 63 |
-
### Report workflow
|
| 64 |
-
- receives the top recommendations and all results
|
| 65 |
-
- computes average recommendation score by genre
|
| 66 |
-
- returns a text summary you can show in the app
|
| 67 |
-
|
| 68 |
-
## 5) What the app does
|
| 69 |
-
- scores review sentiment with VADER
|
| 70 |
-
- merges title-level sentiment with watch metrics
|
| 71 |
-
- computes a weighted recommendation score
|
| 72 |
-
- labels each title with a business action
|
| 73 |
-
- sends results to two separate n8n workflows
|
|
|
|
| 8 |
python_version: "3.10"
|
| 9 |
app_file: app.py
|
| 10 |
pinned: false
|
|
|
|
| 11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|