Spaces:
Running
Running
Update main.py
Browse files
main.py
CHANGED
@@ -403,20 +403,24 @@ async def usage_page():
|
|
403 |
<th>Entity</th>
|
404 |
<th>Requests</th>
|
405 |
</tr>
|
406 |
-
{"".join([
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
|
|
|
|
|
|
414 |
</table>
|
415 |
</body>
|
416 |
</html>
|
417 |
"""
|
418 |
|
419 |
return HTMLResponse(content=html_content)
|
|
|
420 |
@app.on_event("startup")
|
421 |
async def startup_event():
|
422 |
global available_model_ids
|
|
|
403 |
<th>Entity</th>
|
404 |
<th>Requests</th>
|
405 |
</tr>
|
406 |
+
{"".join([
|
407 |
+
"".join([
|
408 |
+
f"""
|
409 |
+
<tr>
|
410 |
+
<td>{date}</td>
|
411 |
+
<td>{entity}</td>
|
412 |
+
<td>{requests}</td>
|
413 |
+
</tr>
|
414 |
+
""" for entity, requests in date_data.items()
|
415 |
+
]) for date, date_data in usage_data['recent_daily_usage'].items()
|
416 |
+
])}
|
417 |
</table>
|
418 |
</body>
|
419 |
</html>
|
420 |
"""
|
421 |
|
422 |
return HTMLResponse(content=html_content)
|
423 |
+
|
424 |
@app.on_event("startup")
|
425 |
async def startup_event():
|
426 |
global available_model_ids
|