Update app.py
Browse files
app.py
CHANGED
|
@@ -40,7 +40,7 @@ def fetch_response(prompt_text):
|
|
| 40 |
continue
|
| 41 |
# Break if we encounter a stop sequence
|
| 42 |
if response.token.text in gen_kwargs["stop_sequences"]:
|
| 43 |
-
|
| 44 |
# Append the new token's text to the partial text
|
| 45 |
partial_text += response.token.text
|
| 46 |
yield response.token.text # Yield only the new chunk
|
|
|
|
| 40 |
continue
|
| 41 |
# Break if we encounter a stop sequence
|
| 42 |
if response.token.text in gen_kwargs["stop_sequences"]:
|
| 43 |
+
break
|
| 44 |
# Append the new token's text to the partial text
|
| 45 |
partial_text += response.token.text
|
| 46 |
yield response.token.text # Yield only the new chunk
|