Almaatla commited on
Commit
3f61915
·
verified ·
1 Parent(s): dfacca1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -1,5 +1,4 @@
1
  from fastapi import FastAPI, Request
2
- from fastapi.staticfiles import StaticFiles
3
  from fastapi.templating import Jinja2Templates
4
  from sentence_transformers import SentenceTransformer
5
  import faiss
@@ -9,8 +8,7 @@ app = FastAPI()
9
  model = SentenceTransformer('paraphrase-MiniLM-L6-v2')
10
  index = faiss.IndexFlatL2(384) # 384 is the dimensionality of the MiniLM model
11
 
12
- app.mount("/static", StaticFiles(directory="static"), name="static")
13
- templates = Jinja2Templates(directory="templates")
14
 
15
  @app.get("/")
16
  def read_root(request: Request):
 
1
  from fastapi import FastAPI, Request
 
2
  from fastapi.templating import Jinja2Templates
3
  from sentence_transformers import SentenceTransformer
4
  import faiss
 
8
  model = SentenceTransformer('paraphrase-MiniLM-L6-v2')
9
  index = faiss.IndexFlatL2(384) # 384 is the dimensionality of the MiniLM model
10
 
11
+ templates = Jinja2Templates(directory=".")
 
12
 
13
  @app.get("/")
14
  def read_root(request: Request):