Spaces:
Runtime error
Runtime error
Commit
·
04643f1
1
Parent(s):
1ff7960
Update main.py
Browse files
main.py
CHANGED
|
@@ -4,16 +4,14 @@ from fastapi import FastAPI
|
|
| 4 |
from fastapi.responses import HTMLResponse
|
| 5 |
import os
|
| 6 |
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
app = FastAPI()
|
| 12 |
|
| 13 |
|
| 14 |
-
@app.get("/")
|
| 15 |
async def root():
|
| 16 |
-
return
|
|
|
|
|
|
|
| 17 |
|
| 18 |
@app.get("/{year}/{race}/{session}", response_model=None)
|
| 19 |
async def get_data(year: int, race: int | str, session: str) -> any:
|
|
|
|
| 4 |
from fastapi.responses import HTMLResponse
|
| 5 |
import os
|
| 6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
app = FastAPI()
|
| 8 |
|
| 9 |
|
| 10 |
+
@app.get("/", response_model=None)
|
| 11 |
async def root():
|
| 12 |
+
return HTMLResponse(
|
| 13 |
+
content="""<iframe src="https://tracinginsights-f1-analysis.hf.space" frameborder="0"></iframe>""",
|
| 14 |
+
status_code=200)
|
| 15 |
|
| 16 |
@app.get("/{year}/{race}/{session}", response_model=None)
|
| 17 |
async def get_data(year: int, race: int | str, session: str) -> any:
|