malvika2003 commited on
Commit
7ec8eb2
1 Parent(s): 61827fd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -1,9 +1,10 @@
1
  from fastapi import FastAPI, Form, Request
2
- from fastapi.responses import HTMLResponse
3
  from fastapi.templating import Jinja2Templates
 
4
 
5
  app = FastAPI()
6
- templates = Jinja2Templates(directory="templates")
7
 
8
  @app.get("/", response_class=HTMLResponse)
9
  async def read_form(request: Request):
 
1
  from fastapi import FastAPI, Form, Request
2
+ from fastapi.responses import HTMLResponse, FileResponse
3
  from fastapi.templating import Jinja2Templates
4
+ import os
5
 
6
  app = FastAPI()
7
+ templates = Jinja2Templates(directory=os.path.dirname(__file__))
8
 
9
  @app.get("/", response_class=HTMLResponse)
10
  async def read_form(request: Request):