luciferai-devil commited on
Commit
361a2d6
Β·
verified Β·
1 Parent(s): 94140d6

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. server/app.py +22 -4
server/app.py CHANGED
@@ -18,7 +18,6 @@ from fastapi.responses import HTMLResponse
18
  @app.get("/web", response_class=HTMLResponse)
19
  @app.get("/web/", response_class=HTMLResponse)
20
  def home():
21
- # ... (same HTML as before)
22
  return """
23
  <!DOCTYPE html>
24
  <html>
@@ -37,6 +36,7 @@ def home():
37
  min-height: 100vh;
38
  margin: 0;
39
  text-align: center;
 
40
  }
41
  .container {
42
  background: rgba(30, 41, 59, 0.7);
@@ -46,7 +46,9 @@ def home():
46
  border: 1px solid rgba(255, 255, 255, 0.1);
47
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
48
  max-width: 600px;
 
49
  }
 
50
  h1 { font-size: 3rem; margin-bottom: 0.5rem; background: linear-gradient(to right, #60a5fa, #a78bfa); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
51
  p { color: #94a3b8; font-size: 1.1rem; line-height: 1.6; }
52
  .badge { background: #334155; padding: 4px 12px; border-radius: 20px; font-size: 0.8rem; vertical-align: middle; border: 1px solid #475569; }
@@ -61,25 +63,41 @@ def home():
61
  text-decoration: none;
62
  transition: all 0.2s;
63
  font-weight: 600;
 
 
64
  }
65
  .btn:hover { background: rgba(255, 255, 255, 0.1); border-color: #60a5fa; transform: translateY(-2px); }
 
 
 
 
 
66
  footer { margin-top: 2rem; color: #64748b; font-size: 0.9rem; }
67
  </style>
68
  </head>
69
  <body>
70
- <div class="container">
71
  <h1>Code Debug Env</h1>
72
- <p>A production-grade <strong>OpenEnv</strong> for training frontier reasoning agents on code repair tasks. <span class="badge">v1.0.0</span></p>
73
 
74
  <div class="grid">
75
  <a href="/health" class="btn">πŸ“‘ Server Health</a>
76
  <a href="/tasks" class="btn">πŸ“‹ Task Registry</a>
77
- <a href="/baseline" class="btn">πŸ€– Run Baseline</a>
 
 
 
78
  <a href="https://huggingface.co/spaces/luciferai-devil/code-debug-env" class="btn">πŸ“– Documentation</a>
79
  </div>
80
 
81
  <footer>Built for Meta & PyTorch Γ— Scaler Hackathon</footer>
82
  </div>
 
 
 
 
 
 
83
  </body>
84
  </html>
85
  """
 
18
  @app.get("/web", response_class=HTMLResponse)
19
  @app.get("/web/", response_class=HTMLResponse)
20
  def home():
 
21
  return """
22
  <!DOCTYPE html>
23
  <html>
 
36
  min-height: 100vh;
37
  margin: 0;
38
  text-align: center;
39
+ overflow-x: hidden;
40
  }
41
  .container {
42
  background: rgba(30, 41, 59, 0.7);
 
46
  border: 1px solid rgba(255, 255, 255, 0.1);
47
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
48
  max-width: 600px;
49
+ animation: fadeIn 0.8s ease-out;
50
  }
51
+ @keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
52
  h1 { font-size: 3rem; margin-bottom: 0.5rem; background: linear-gradient(to right, #60a5fa, #a78bfa); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
53
  p { color: #94a3b8; font-size: 1.1rem; line-height: 1.6; }
54
  .badge { background: #334155; padding: 4px 12px; border-radius: 20px; font-size: 0.8rem; vertical-align: middle; border: 1px solid #475569; }
 
63
  text-decoration: none;
64
  transition: all 0.2s;
65
  font-weight: 600;
66
+ position: relative;
67
+ overflow: hidden;
68
  }
69
  .btn:hover { background: rgba(255, 255, 255, 0.1); border-color: #60a5fa; transform: translateY(-2px); }
70
+ .btn.loading { pointer-events: none; opacity: 0.7; }
71
+ .loading-text { display: none; }
72
+ .btn.loading .loading-text { display: inline-block; animation: pulse 1.5s infinite; }
73
+ .btn.loading span:not(.loading-text) { display: none; }
74
+ @keyframes pulse { 0% { opacity: 0.4; } 50% { opacity: 1; } 100% { opacity: 0.4; } }
75
  footer { margin-top: 2rem; color: #64748b; font-size: 0.9rem; }
76
  </style>
77
  </head>
78
  <body>
79
+ <div class="container" id="main-card">
80
  <h1>Code Debug Env</h1>
81
+ <p>A production-grade <strong>OpenEnv</strong> for training frontier reasoning agents on code repair tasks. <span class="badge">v1.1.0</span></p>
82
 
83
  <div class="grid">
84
  <a href="/health" class="btn">πŸ“‘ Server Health</a>
85
  <a href="/tasks" class="btn">πŸ“‹ Task Registry</a>
86
+ <a id="baseline-btn" href="/baseline" class="btn">
87
+ <span>πŸ€– Run Baseline</span>
88
+ <span class="loading-text">⏳ Evaluating (~2 mins)...</span>
89
+ </a>
90
  <a href="https://huggingface.co/spaces/luciferai-devil/code-debug-env" class="btn">πŸ“– Documentation</a>
91
  </div>
92
 
93
  <footer>Built for Meta & PyTorch Γ— Scaler Hackathon</footer>
94
  </div>
95
+
96
+ <script>
97
+ document.getElementById('baseline-btn').addEventListener('click', function(e) {
98
+ this.classList.add('loading');
99
+ });
100
+ </script>
101
  </body>
102
  </html>
103
  """