Spaces:
Runtime error
Runtime error
bug fix
Browse files
main.py
CHANGED
@@ -12,7 +12,6 @@ from fastapi.templating import Jinja2Templates
|
|
12 |
from fastapi.staticfiles import StaticFiles
|
13 |
from fastapi.responses import HTMLResponse
|
14 |
import pandas as pd
|
15 |
-
pd.set_option('display.max_colwidth', 100)
|
16 |
import time
|
17 |
from uuid import uuid1
|
18 |
from localStoragePy import localStoragePy
|
@@ -59,6 +58,7 @@ def post_register(request: Request, username: str = Form(...), password: str = F
|
|
59 |
|
60 |
@app.post("/login/", response_class=HTMLResponse)
|
61 |
def post_login(request: Request, username: str = Form(...), password: str = Form(...)):
|
|
|
62 |
db = pd.read_csv('static/embeddings_db.csv')
|
63 |
if username in list(db['username']):
|
64 |
pw = db.loc[db['username'] == username,'password'].to_string()
|
@@ -129,7 +129,6 @@ async def post_matches(request: Request, bt: BackgroundTasks, resume: UploadFile
|
|
129 |
return print("username was None")
|
130 |
else:
|
131 |
def add_data_to_db(resume, db, username):
|
132 |
-
# pd.concat([df, pd.DataFrame(embeds)], axis=1)
|
133 |
embeds = format(coSkillEmbed(resume)).replace('[[','').replace(']]','').split(',')
|
134 |
db.iloc[db['username']== username,4:] = embeds
|
135 |
db.to_csv('static/embeddings_db.csv')
|
|
|
12 |
from fastapi.staticfiles import StaticFiles
|
13 |
from fastapi.responses import HTMLResponse
|
14 |
import pandas as pd
|
|
|
15 |
import time
|
16 |
from uuid import uuid1
|
17 |
from localStoragePy import localStoragePy
|
|
|
58 |
|
59 |
@app.post("/login/", response_class=HTMLResponse)
|
60 |
def post_login(request: Request, username: str = Form(...), password: str = Form(...)):
|
61 |
+
pd.set_option('display.max_colwidth', 100)
|
62 |
db = pd.read_csv('static/embeddings_db.csv')
|
63 |
if username in list(db['username']):
|
64 |
pw = db.loc[db['username'] == username,'password'].to_string()
|
|
|
129 |
return print("username was None")
|
130 |
else:
|
131 |
def add_data_to_db(resume, db, username):
|
|
|
132 |
embeds = format(coSkillEmbed(resume)).replace('[[','').replace(']]','').split(',')
|
133 |
db.iloc[db['username']== username,4:] = embeds
|
134 |
db.to_csv('static/embeddings_db.csv')
|