Update README.md
Browse files
README.md
CHANGED
|
@@ -11,16 +11,42 @@ license: mit
|
|
| 11 |
short_description: Keep MCP-birthday hackathon spaces availble
|
| 12 |
---
|
| 13 |
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
Keeps HuggingFace Spaces alive during hackathon evaluation by pinging them on a schedule.
|
| 17 |
|
| 18 |
-
##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
|
| 25 |
## Configuration
|
| 26 |
|
|
@@ -28,19 +54,25 @@ Set these environment variables in your Space settings:
|
|
| 28 |
|
| 29 |
| Variable | Default | Description |
|
| 30 |
|----------|---------|-------------|
|
| 31 |
-
| `ORG_NAME` | `
|
| 32 |
-
| `PING_INTERVAL_HOURS` | `
|
| 33 |
-
| `
|
|
|
|
|
|
|
| 34 |
|
| 35 |
-
##
|
| 36 |
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
|
|
|
|
|
|
| 41 |
|
| 42 |
-
##
|
| 43 |
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
|
|
|
|
|
|
|
|
| 11 |
short_description: Keep MCP-birthday hackathon spaces availble
|
| 12 |
---
|
| 13 |
|
| 14 |
+
---
|
| 15 |
+
title: Space Keeper
|
| 16 |
+
emoji: π
|
| 17 |
+
colorFrom: blue
|
| 18 |
+
colorTo: green
|
| 19 |
+
sdk: gradio
|
| 20 |
+
sdk_version: 4.44.0
|
| 21 |
+
app_file: app.py
|
| 22 |
+
pinned: false
|
| 23 |
+
---
|
| 24 |
+
|
| 25 |
+
# π Space Keeper v2
|
| 26 |
|
| 27 |
Keeps HuggingFace Spaces alive during hackathon evaluation by pinging them on a schedule.
|
| 28 |
|
| 29 |
+
## Features
|
| 30 |
+
|
| 31 |
+
- **Live Progress** β See real-time updates as Spaces are being pinged
|
| 32 |
+
- **Parallel Pinging** β Pings 10 Spaces simultaneously for speed
|
| 33 |
+
- **Run History** β View logs of all past runs with success/failure counts
|
| 34 |
+
- **Auto-Scheduler** β Automatically runs every 12 hours (configurable)
|
| 35 |
+
- **Statistics** β Track total pings, success rates, and uptime
|
| 36 |
|
| 37 |
+
## How It Works
|
| 38 |
+
|
| 39 |
+
1. **Manual Run:** Click "π Run Now" to immediately ping all Spaces
|
| 40 |
+
2. **Scheduled Run:** A background thread automatically runs every N hours
|
| 41 |
+
3. **What happens:** For each Space, we send an HTTP GET to wake it up
|
| 42 |
+
|
| 43 |
+
### Important: Scheduler Limitations
|
| 44 |
+
|
| 45 |
+
The scheduler runs as a background thread. **If this Space sleeps, the scheduler stops.**
|
| 46 |
+
|
| 47 |
+
To keep the scheduler running reliably:
|
| 48 |
+
- Visit this Space at least once every 48 hours, OR
|
| 49 |
+
- Set this Space to "Running" mode in settings (costs money)
|
| 50 |
|
| 51 |
## Configuration
|
| 52 |
|
|
|
|
| 54 |
|
| 55 |
| Variable | Default | Description |
|
| 56 |
|----------|---------|-------------|
|
| 57 |
+
| `ORG_NAME` | `MCP-1st-Birthday` | HuggingFace organization to monitor |
|
| 58 |
+
| `PING_INTERVAL_HOURS` | `12` | Hours between automatic runs |
|
| 59 |
+
| `PARALLEL_REQUESTS` | `10` | Spaces to ping simultaneously |
|
| 60 |
+
| `REQUEST_TIMEOUT` | `30` | Seconds before a ping times out |
|
| 61 |
+
| `HF_TOKEN` | *(optional)* | Only needed for private Spaces |
|
| 62 |
|
| 63 |
+
## Files
|
| 64 |
|
| 65 |
+
```
|
| 66 |
+
space-keeper-v2/
|
| 67 |
+
βββ app.py # Main application
|
| 68 |
+
βββ requirements.txt # Python dependencies
|
| 69 |
+
βββ README.md # This file (also contains HF Space metadata)
|
| 70 |
+
```
|
| 71 |
|
| 72 |
+
## Usage
|
| 73 |
|
| 74 |
+
1. Create a new Space at https://huggingface.co/new-space (SDK: Gradio)
|
| 75 |
+
2. Upload all 3 files
|
| 76 |
+
3. Optionally set `ORG_NAME` environment variable
|
| 77 |
+
4. Click "π Run Now" to test
|
| 78 |
+
5. Keep the Space awake for automatic scheduling
|