sumit989 commited on
Commit
d044478
Β·
verified Β·
1 Parent(s): 3a2ee6c

Update openenv.yaml

Browse files
Files changed (1) hide show
  1. openenv.yaml +58 -6
openenv.yaml CHANGED
@@ -1,9 +1,61 @@
1
- name: code-rescue-env
2
 
3
- version: 1.0
 
 
 
 
 
 
4
 
5
- endpoints:
6
- reset: /openenv/reset
 
7
 
8
- runtime:
9
- type: docker
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # openenv.yaml β€” CodeRescue deployment config (Hugging Face Spaces / Docker)
2
 
3
+ title: CodeRescue API
4
+ emoji: πŸ› οΈ
5
+ colorFrom: blue
6
+ colorTo: purple
7
+ sdk: docker
8
+ app_port: 7860
9
+ pinned: false
10
 
11
+ # ── Environment Variables ──────────────────────────────────────────────────────
12
+ # Set secrets via the Space's Settings β†’ Variables and Secrets panel.
13
+ # Values listed here are safe public defaults only.
14
 
15
+ env:
16
+ # HuggingFace Inference Router base URL
17
+ API_BASE_URL: "https://router.huggingface.co/v1"
18
+
19
+ # Model served through the router
20
+ MODEL_NAME: "Qwen/Qwen2.5-Coder-7B-Instruct"
21
+
22
+ # Comma-separated list of allowed frontend origins (CORS)
23
+ ALLOWED_ORIGINS: "https://sumit989bishnoi-crypto.github.io"
24
+
25
+ # Server port (must match app_port above)
26
+ PORT: "7860"
27
+
28
+ # ── Secrets (set in Space Settings, never commit values here) ─────────────────
29
+ secrets:
30
+ # Primary API key β€” checked first
31
+ - API_KEY
32
+
33
+ # Fallback HuggingFace token β€” used if API_KEY is not set
34
+ - HF_TOKEN
35
+
36
+ # ── Routes exposed by app.py ───────────────────────────────────────────────────
37
+ # GET / β†’ status check {"name","version","status"}
38
+ # GET /health β†’ health check {"status":"ok"}
39
+ # POST /analyze β†’ main endpoint {"code": "..."}
40
+ # POST /reset β†’ soft reset {"status":"success"}
41
+ # POST /openenv/reset β†’ alias reset {"status":"success"}
42
+ # ── OpenEnv Spec ───────────────────────────────────────────────────────────────
43
+
44
+ environment:
45
+ name: CodeDebugEnv
46
+ description: Environment where an AI agent fixes buggy code
47
+
48
+ action_space:
49
+ type: dict
50
+ fields:
51
+ fixed_code: string
52
+
53
+ observation_space:
54
+ type: dict
55
+ fields:
56
+ code: string
57
+ difficulty: string
58
+
59
+ reward:
60
+ type: float
61
+ range: [0.0, 1.0]