Spaces:
Runtime error
Runtime error
added prints
Browse files
app.py
CHANGED
@@ -142,13 +142,13 @@ def chat(file, question):
|
|
142 |
|
143 |
|
144 |
chunks = get_chunks(text)
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
|
149 |
client = QdrantClient(path = "./db")
|
150 |
-
|
151 |
-
|
152 |
|
153 |
client.recreate_collection(
|
154 |
collection_name="my_facts",
|
@@ -158,8 +158,8 @@ def chat(file, question):
|
|
158 |
),
|
159 |
)
|
160 |
|
161 |
-
|
162 |
-
|
163 |
|
164 |
|
165 |
|
@@ -181,8 +181,8 @@ def chat(file, question):
|
|
181 |
],
|
182 |
)
|
183 |
|
184 |
-
|
185 |
-
|
186 |
|
187 |
|
188 |
hits = client.search(
|
@@ -212,7 +212,7 @@ def chat(file, question):
|
|
212 |
User: {question}"""
|
213 |
|
214 |
prompt_template = B_INST + SYSTEM_PROMPT + instruction + E_INST
|
215 |
-
|
216 |
result = llm(prompt_template)
|
217 |
return result
|
218 |
|
|
|
142 |
|
143 |
|
144 |
chunks = get_chunks(text)
|
145 |
+
print(chunks)
|
146 |
+
print("Chunks are ready.....................................")
|
147 |
+
print("######################################################")
|
148 |
|
149 |
client = QdrantClient(path = "./db")
|
150 |
+
print("db created................................................")
|
151 |
+
print("#####################################################################")
|
152 |
|
153 |
client.recreate_collection(
|
154 |
collection_name="my_facts",
|
|
|
158 |
),
|
159 |
)
|
160 |
|
161 |
+
print("Collection created........................................")
|
162 |
+
print("#########################################################")
|
163 |
|
164 |
|
165 |
|
|
|
181 |
],
|
182 |
)
|
183 |
|
184 |
+
print("Records uploaded........................................")
|
185 |
+
print("###########################################################")
|
186 |
|
187 |
|
188 |
hits = client.search(
|
|
|
212 |
User: {question}"""
|
213 |
|
214 |
prompt_template = B_INST + SYSTEM_PROMPT + instruction + E_INST
|
215 |
+
print(prompt_template)
|
216 |
result = llm(prompt_template)
|
217 |
return result
|
218 |
|