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 lines68697071727374757677787980818267 unmodified lines try: # this shitty fix will be until i willnt figure out why sometimes there is empty output counter = 1 while 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, ' ']: break counter += 1 logs += f"Final attempt: {counter}\n" if language in languages: logs += f"\nTranslating from en to {language}"gradio_app.py+4