LalitMahale
commited on
Commit
·
5916e02
1
Parent(s):
286227c
issue was in main.py
Browse files- app.py +1 -1
- data/question_data.pkl +0 -0
- main.py +1 -1
app.py
CHANGED
|
@@ -28,6 +28,6 @@ async def chatbot(text: str = ""):
|
|
| 28 |
if not text:
|
| 29 |
raise HTTPException(status_code=400, detail="No text provided")
|
| 30 |
# Perform translation using deep_translator
|
| 31 |
-
result = process(
|
| 32 |
return {"result": result}
|
| 33 |
|
|
|
|
| 28 |
if not text:
|
| 29 |
raise HTTPException(status_code=400, detail="No text provided")
|
| 30 |
# Perform translation using deep_translator
|
| 31 |
+
result = process(user_query=text)
|
| 32 |
return {"result": result}
|
| 33 |
|
data/question_data.pkl
CHANGED
|
Binary files a/data/question_data.pkl and b/data/question_data.pkl differ
|
|
|
main.py
CHANGED
|
@@ -21,7 +21,7 @@ def dump_user_question(query):
|
|
| 21 |
with open(r"data\question_data.pkl","wb") as f:
|
| 22 |
pickle.dump([],f)
|
| 23 |
|
| 24 |
-
def process(user_query):
|
| 25 |
dump_user_question(user_query)
|
| 26 |
user_embedding = GetEmbedding([user_query]).user_query_emb()
|
| 27 |
with open(r"data\question_embedding_latest.pkl","rb") as f:
|
|
|
|
| 21 |
with open(r"data\question_data.pkl","wb") as f:
|
| 22 |
pickle.dump([],f)
|
| 23 |
|
| 24 |
+
def process(user_query:str):
|
| 25 |
dump_user_question(user_query)
|
| 26 |
user_embedding = GetEmbedding([user_query]).user_query_emb()
|
| 27 |
with open(r"data\question_embedding_latest.pkl","rb") as f:
|