ysharma HF Staff commited on
Commit
8062810
Β·
verified Β·
1 Parent(s): 7d52e41

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +15 -54
README.md CHANGED
@@ -11,68 +11,29 @@ license: mit
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
 
53
- Set these environment variables in your Space settings:
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
 
11
  short_description: Keep MCP-birthday hackathon spaces availble
12
  ---
13
 
14
+ # πŸ”„ Space Keeper
 
 
 
 
 
 
 
 
 
 
 
15
 
16
+ Pings all Spaces in the HuggingFace organization `MCP-1st-Birthday` to keep them awake.
17
 
18
+ ## Usage
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
 
20
+ 1. Click **πŸš€ Run Now** to manually ping all Spaces
21
+ 2. Watch live progress as each Space is pinged
22
+ 3. Check Run History for past results
23
 
24
+ ## Auto-Scheduling
 
 
25
 
26
+ The app automatically runs every 12 hours **while this Space is awake**.
27
 
28
+ ## Environment Variables (optional)
29
 
30
+ Set in **Settings β†’ Variables and secrets**:
 
 
 
 
 
 
31
 
32
+ | Variable | Default | What it does |
33
+ |----------|---------|--------------|
34
+ | `ORG_NAME` | `MCP-1st-Birthday` | Organization to monitor |
35
+ | `HF_TOKEN` | β€” | Add to check/ping private Spaces |
36
+ | `PING_INTERVAL_HOURS` | `12` | Hours between auto-runs |
37
 
 
 
 
 
 
 
38
 
 
39