Update app.py
Browse files
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 |
-
|
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):
|