Spaces:
Runtime error
Runtime error
Commit ·
68cfcbc
1
Parent(s): 962c2a7
Update main.py
Browse files4 unmodified lines56789104 unmodified lines1516171819202122234 unmodified linesapp = FastAPI()4 unmodified lines@app.get("/{year}/{race}/{session}", response_model=None)async def get_data(year: int, race: int, session: str) -> any:cache_path = os.path.abspath('Cache')fastf1.Cache.enable_cache(cache_path)f1session = fastf1.get_session(year, race, session)f1session.load(telemetry=False, weather=False, messages=False)4 unmodified lines567891011124 unmodified lines1718192021222324252627284 unmodified linesapp = FastAPI()4 unmodified lines@app.get("/{year}/{race}/{session}", response_model=None)async def get_data(year: int, race: int, session: str) -> any:if not os.path.exists('Cache'):os.makedir('Cache')fastf1.Cache.enable_cache('Cache')f1session = fastf1.get_session(year, race, session)f1session.load(telemetry=False, weather=False, messages=False)
main.py+7-2