Spaces:
Running
Running
Commit
•
939cad2
1
Parent(s):
97bbc3c
Update gradio_app.py
Browse files- gradio_app.py +1 -1
gradio_app.py
CHANGED
@@ -45,7 +45,7 @@ def generate_answer(request: str, max_tokens: int = 256, custom_prompt: str = No
|
|
45 |
try:
|
46 |
# this shitty fix will be until i willnt figure out why sometimes there is empty output
|
47 |
counter = 1
|
48 |
-
while counter <=
|
49 |
logs += f"Attempt {counter} to generate answer...\n"
|
50 |
output = llm(userPrompt, max_tokens=maxTokens, stop=["User:"], echo=False)
|
51 |
text = output["choices"][0]["text"]
|
|
|
45 |
try:
|
46 |
# this shitty fix will be until i willnt figure out why sometimes there is empty output
|
47 |
counter = 1
|
48 |
+
while counter <= 3:
|
49 |
logs += f"Attempt {counter} to generate answer...\n"
|
50 |
output = llm(userPrompt, max_tokens=maxTokens, stop=["User:"], echo=False)
|
51 |
text = output["choices"][0]["text"]
|