Spaces:
Sleeping
Sleeping
Commit
·
2c2e98e
1
Parent(s):
939cad2
Update gradio_app.py
Browse files- gradio_app.py +1 -1
gradio_app.py
CHANGED
@@ -47,7 +47,7 @@ def generate_answer(request: str, max_tokens: int = 256, custom_prompt: str = No
|
|
47 |
counter = 1
|
48 |
while counter <= 3:
|
49 |
logs += f"Attempt {counter} to generate answer...\n"
|
50 |
-
output = llm(userPrompt, max_tokens=maxTokens, stop=["
|
51 |
text = output["choices"][0]["text"]
|
52 |
if len(text.strip()) > 1 and text.strip() not in ['', None, ' ']:
|
53 |
break
|
|
|
47 |
counter = 1
|
48 |
while counter <= 3:
|
49 |
logs += f"Attempt {counter} to generate answer...\n"
|
50 |
+
output = llm(userPrompt, max_tokens=maxTokens, stop=["<|im_end|>"], echo=False)
|
51 |
text = output["choices"][0]["text"]
|
52 |
if len(text.strip()) > 1 and text.strip() not in ['', None, ' ']:
|
53 |
break
|