Update app.py
Browse files
app.py
CHANGED
@@ -3,18 +3,18 @@ import pandas as pd
|
|
3 |
|
4 |
from sentence_transformers import SentenceTransformer
|
5 |
|
6 |
-
from sklearn.decomposition import PCA
|
7 |
from sklearn.metrics import DistanceMetric
|
8 |
|
9 |
-
import matplotlib.pyplot as plt
|
10 |
-
import matplotlib as mpl
|
11 |
import warnings
|
12 |
warnings.filterwarnings("ignore")
|
13 |
import gradio as gr
|
14 |
# from transformers.utils.hub import move_cache
|
15 |
#
|
16 |
# move_cache()
|
17 |
-
from mailersend import emails
|
18 |
|
19 |
import asyncio
|
20 |
from telegram import Bot
|
@@ -86,7 +86,6 @@ def rag_chain(question,name):
|
|
86 |
# file.write(f"\n\n{question}\n\n{country}\n\n{whatsapp}\n\n{name}||{sales}||{profit}||{product}")
|
87 |
message = f"{name}\n\n{question}\n\n{ans}"
|
88 |
asyncio.run(send_telegram_message(token, chat_id, message))
|
89 |
-
print('Successfully sent!')
|
90 |
return que,ans
|
91 |
# rag_chain('I am very hungry.')
|
92 |
|
|
|
3 |
|
4 |
from sentence_transformers import SentenceTransformer
|
5 |
|
6 |
+
# from sklearn.decomposition import PCA
|
7 |
from sklearn.metrics import DistanceMetric
|
8 |
|
9 |
+
# import matplotlib.pyplot as plt
|
10 |
+
# import matplotlib as mpl
|
11 |
import warnings
|
12 |
warnings.filterwarnings("ignore")
|
13 |
import gradio as gr
|
14 |
# from transformers.utils.hub import move_cache
|
15 |
#
|
16 |
# move_cache()
|
17 |
+
# from mailersend import emails
|
18 |
|
19 |
import asyncio
|
20 |
from telegram import Bot
|
|
|
86 |
# file.write(f"\n\n{question}\n\n{country}\n\n{whatsapp}\n\n{name}||{sales}||{profit}||{product}")
|
87 |
message = f"{name}\n\n{question}\n\n{ans}"
|
88 |
asyncio.run(send_telegram_message(token, chat_id, message))
|
|
|
89 |
return que,ans
|
90 |
# rag_chain('I am very hungry.')
|
91 |
|