Spaces:
Build error
Build error
Joseph commited on
Commit ·
0fef086
1
Parent(s): a5ef5d4
updated logs
Browse filesnow it will show how much attempts spent on generate answers
67 unmodified lines686970717273747576777867 unmodified linestry:# this shitty fix will be until i willnt figure out why sometimes there is empty outputwhile True:output = llm(userPrompt, max_tokens=maxTokens, stop=["User:"], echo=False)text = output["choices"][0]["text"]if len(text.strip()) > 1 and text.strip() not in ['', None, ' ']:breakif language in languages:logs += f"\nTranslating from en to {language}"67 unmodified lines68697071727374757677787980818267 unmodified linestry:# this shitty fix will be until i willnt figure out why sometimes there is empty outputcounter = 1while True:logs += f"Attempt {counter} to generate answer...\n"output = llm(userPrompt, max_tokens=maxTokens, stop=["User:"], echo=False)text = output["choices"][0]["text"]if len(text.strip()) > 1 and text.strip() not in ['', None, ' ']:breakcounter += 1logs += f"Final attempt: {counter}\n"if language in languages:logs += f"\nTranslating from en to {language}"
gradio_app.py+4