jbaselga commited on
Commit
2b24886
·
verified ·
1 Parent(s): 07e174e

Update api_server.py

Browse files
Files changed (1) hide show
  1. api_server.py +33 -0
api_server.py CHANGED
@@ -82,6 +82,9 @@ def get_file(task_id: str):
82
  with open(file_path, "r") as file:
83
  content = file.read()
84
  return {"task_id": task_id, "content": content}
 
 
 
85
  from fastapi.responses import HTMLResponse
86
 
87
  @app.get("/", response_class=HTMLResponse)
@@ -91,6 +94,35 @@ def read_root():
91
  <html>
92
  <head>
93
  <title>GAIA Agents - Test Interface</title>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
  </head>
95
  <body>
96
  <h1>GAIA Agents - Preguntas y Respuestas</h1>
@@ -143,3 +175,4 @@ def read_root():
143
  </body>
144
  </html>
145
  """
 
 
82
  with open(file_path, "r") as file:
83
  content = file.read()
84
  return {"task_id": task_id, "content": content}
85
+
86
+
87
+
88
  from fastapi.responses import HTMLResponse
89
 
90
  @app.get("/", response_class=HTMLResponse)
 
94
  <html>
95
  <head>
96
  <title>GAIA Agents - Test Interface</title>
97
+ <style>
98
+ body { font-family: Arial, sans-serif; margin: 40px; background: #f7f7fa; }
99
+ h1 { color: #6d28d9; }
100
+ button {
101
+ background: #ec4899;
102
+ color: white;
103
+ border: none;
104
+ padding: 10px 20px;
105
+ margin: 10px 0;
106
+ border-radius: 5px;
107
+ font-size: 16px;
108
+ cursor: pointer;
109
+ }
110
+ button:hover { background: #be185d; }
111
+ #questions div {
112
+ background: #fff;
113
+ margin: 10px 0;
114
+ padding: 10px;
115
+ border-radius: 5px;
116
+ box-shadow: 0 1px 4px rgba(0,0,0,0.05);
117
+ }
118
+ input[type="text"] {
119
+ padding: 5px;
120
+ border-radius: 3px;
121
+ border: 1px solid #ddd;
122
+ width: 60%;
123
+ }
124
+ #result { margin-top: 20px; }
125
+ </style>
126
  </head>
127
  <body>
128
  <h1>GAIA Agents - Preguntas y Respuestas</h1>
 
175
  </body>
176
  </html>
177
  """
178
+