Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -224,8 +224,8 @@ def entity_extractor_by_llm(query, llm, show_process = False, max_length = 512):
|
|
224 |
delta = chunk['choices'][0]['delta']
|
225 |
if "content" in delta:
|
226 |
out_text += delta['content']
|
227 |
-
from IPython.display import clear_output
|
228 |
-
clear_output(wait=True)
|
229 |
if show_process:
|
230 |
print(out_text)
|
231 |
if len(out_text) >= max_length:
|
@@ -284,8 +284,8 @@ def query_content_ask_func(question, content_list,
|
|
284 |
delta = chunk['choices'][0]['delta']
|
285 |
if "content" in delta:
|
286 |
out_text += delta['content']
|
287 |
-
from IPython.display import clear_output
|
288 |
-
clear_output(wait=True)
|
289 |
if show_process:
|
290 |
print(out_text)
|
291 |
if len(out_text) >= max_length:
|
@@ -388,7 +388,7 @@ def mistral_predict(prompt, llm, show_process = True, max_length = 512):
|
|
388 |
],
|
389 |
stream=True
|
390 |
)
|
391 |
-
from IPython.display import clear_output
|
392 |
out_text = ""
|
393 |
for chunk in out:
|
394 |
delta = chunk['choices'][0]['delta']
|
@@ -398,8 +398,8 @@ def mistral_predict(prompt, llm, show_process = True, max_length = 512):
|
|
398 |
print(out_text)
|
399 |
if len(out_text) >= max_length:
|
400 |
break
|
401 |
-
clear_output(wait=True)
|
402 |
-
clear_output(wait=True)
|
403 |
return out_text
|
404 |
|
405 |
def run_all(query, docsearch_bge_loaded, bge_book_embeddings, book_df,
|
|
|
224 |
delta = chunk['choices'][0]['delta']
|
225 |
if "content" in delta:
|
226 |
out_text += delta['content']
|
227 |
+
#from IPython.display import clear_output
|
228 |
+
#clear_output(wait=True)
|
229 |
if show_process:
|
230 |
print(out_text)
|
231 |
if len(out_text) >= max_length:
|
|
|
284 |
delta = chunk['choices'][0]['delta']
|
285 |
if "content" in delta:
|
286 |
out_text += delta['content']
|
287 |
+
#from IPython.display import clear_output
|
288 |
+
#clear_output(wait=True)
|
289 |
if show_process:
|
290 |
print(out_text)
|
291 |
if len(out_text) >= max_length:
|
|
|
388 |
],
|
389 |
stream=True
|
390 |
)
|
391 |
+
#from IPython.display import clear_output
|
392 |
out_text = ""
|
393 |
for chunk in out:
|
394 |
delta = chunk['choices'][0]['delta']
|
|
|
398 |
print(out_text)
|
399 |
if len(out_text) >= max_length:
|
400 |
break
|
401 |
+
#clear_output(wait=True)
|
402 |
+
#clear_output(wait=True)
|
403 |
return out_text
|
404 |
|
405 |
def run_all(query, docsearch_bge_loaded, bge_book_embeddings, book_df,
|