SwapnilPatil28 commited on
Commit
cd1ba68
·
verified ·
1 Parent(s): 73d1307

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. server/app.py +38 -0
server/app.py CHANGED
@@ -1,10 +1,48 @@
1
  from openenv.core.env_server import create_fastapi_app
2
  from models import SupportAction, SupportObservation
3
  from server.environment import SupportEnvironment
 
4
  import uvicorn
5
 
6
  app = create_fastapi_app(SupportEnvironment, SupportAction, SupportObservation)
7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  def main():
9
  uvicorn.run(app, host="0.0.0.0", port=8000)
10
 
 
1
  from openenv.core.env_server import create_fastapi_app
2
  from models import SupportAction, SupportObservation
3
  from server.environment import SupportEnvironment
4
+ from fastapi.responses import HTMLResponse
5
  import uvicorn
6
 
7
  app = create_fastapi_app(SupportEnvironment, SupportAction, SupportObservation)
8
 
9
+ @app.get("/", response_class=HTMLResponse)
10
+ async def root():
11
+ return """
12
+ <html>
13
+ <head>
14
+ <title>Support Ticket Routing Environment</title>
15
+ <style>
16
+ body { font-family: sans-serif; line-height: 1.6; max-width: 800px; margin: 40px auto; padding: 20px; background: #f4f7f9; color: #333; }
17
+ .card { background: white; padding: 30px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
18
+ h1 { color: #2563eb; }
19
+ .tag { background: #dbeafe; color: #1e40af; padding: 4px 12px; border-radius: 16px; font-size: 0.8em; font-weight: bold; }
20
+ ul { padding-left: 20px; }
21
+ code { background: #eee; padding: 2px 5px; border-radius: 4px; }
22
+ </style>
23
+ </head>
24
+ <body>
25
+ <div class="card">
26
+ <h1>🎫 Support Ticket Routing <span class="tag">OpenEnv v1.0</span></h1>
27
+ <p>Welcome to the Customer Support Triage Environment. This space hosts an automated environment for evaluating LLM agents on their ability to route technical and billing queries.</p>
28
+
29
+ <h3>Environment Details:</h3>
30
+ <ul>
31
+ <li><strong>Departments:</strong> Billing, Tech, Sales</li>
32
+ <li><strong>Actions:</strong> <code>route</code>, <code>search</code></li>
33
+ <li><strong>Observation:</strong> Ticket content and metadata</li>
34
+ </ul>
35
+
36
+ <h3>Judge API Status:</h3>
37
+ <p>✅ API is running. Ready for <code>/reset</code> and <code>/step</code> requests.</p>
38
+
39
+ <hr>
40
+ <p><small>Developed for the OpenEnv Hackathon. Powered by FastAPI & Docker.</small></p>
41
+ </div>
42
+ </body>
43
+ </html>
44
+ """
45
+
46
  def main():
47
  uvicorn.run(app, host="0.0.0.0", port=8000)
48