from fastapi.templating import Jinja2Templates from fastapi import Request from project.bot import bot_router template = Jinja2Templates(directory='project/bot/templates') @bot_router.get('/', name='login') async def voice(request: Request): return template.TemplateResponse("voice.html", {'request': request})