Spaces:
Sleeping
Sleeping
TahaFawzyElshrif commited on
Commit ·
62a16f0
1
Parent(s): d036297
uploaded files
Browse files- agent/rag/rag.py +2 -1
agent/rag/rag.py
CHANGED
|
@@ -6,9 +6,9 @@ import pandas as pd
|
|
| 6 |
class rag_text_chooser:
|
| 7 |
def __init__(self,data_rag):
|
| 8 |
self.data_rag = pd.read_excel(data_rag)
|
|
|
|
| 9 |
|
| 10 |
self.corpus, self.answers = self.get_questions_Answers()
|
| 11 |
-
print("answers", self.answers)
|
| 12 |
self.model = SentenceTransformer('sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2')
|
| 13 |
print(self.model)
|
| 14 |
self.corpus_embeddings = self.model.encode(self.corpus)
|
|
@@ -21,6 +21,7 @@ class rag_text_chooser:
|
|
| 21 |
answers = []
|
| 22 |
|
| 23 |
for _, row in self.data_rag.iterrows():
|
|
|
|
| 24 |
questions.append(row[0])
|
| 25 |
answers.append(row[1])
|
| 26 |
|
|
|
|
| 6 |
class rag_text_chooser:
|
| 7 |
def __init__(self,data_rag):
|
| 8 |
self.data_rag = pd.read_excel(data_rag)
|
| 9 |
+
print("data_rag", self.data_rag)
|
| 10 |
|
| 11 |
self.corpus, self.answers = self.get_questions_Answers()
|
|
|
|
| 12 |
self.model = SentenceTransformer('sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2')
|
| 13 |
print(self.model)
|
| 14 |
self.corpus_embeddings = self.model.encode(self.corpus)
|
|
|
|
| 21 |
answers = []
|
| 22 |
|
| 23 |
for _, row in self.data_rag.iterrows():
|
| 24 |
+
print(row)
|
| 25 |
questions.append(row[0])
|
| 26 |
answers.append(row[1])
|
| 27 |
|