From f1365c378ef3bc5b6cdcff113adcb6bc1eb03af5 Mon Sep 17 00:00:00 2001 From: marioggil Date: Mon, 25 Sep 2023 21:49:43 -0500 Subject: [PATCH] Bugfix: Only answer --- app.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app.py b/app.py index fd478bc..86d07ba 100644 --- a/app.py +++ b/app.py @@ -159,20 +159,20 @@ def FinderDb(query,dbs,filtred=False): def QARequest(message, history): - text="""Hola este chatbot esta en un periodo de prueba, si encuentras alguna falla Notificala y muchas gracias por usarlo. -Respecto a tu pregunta la respuesta es: """ + text="" + query = message context,d=FinderDb(query,db,filtred=True) prompt=prompt_template.format( user_query=query, relevant_context=context ) - print("#############",prompt,"#############",) + #print("#############",prompt,"#############",) text2="" - for i in text: - time.sleep(0.7) - text2=text2+i - yield text2 + # for i in text: + # time.sleep(0.7) + # text2=text2+i + # yield text2 for i in llm.generate(prompt, max_tokens=200, streaming=True,temp=0.01, top_k=40, top_p=0.4): time.sleep(0.7) text2=text2+i