Spaces:
Sleeping
Sleeping
peterpeter8585
commited on
Commit
•
7da96c4
1
Parent(s):
dcb7035
Update app.py
Browse files
app.py
CHANGED
@@ -106,9 +106,9 @@ def respond(
|
|
106 |
response = ""
|
107 |
|
108 |
stream = client.text_generation(formatted_prompt, max_new_tokens=512, stream=True, details=True, return_full_text=False)
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
|
113 |
"""
|
114 |
For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
|
|
|
106 |
response = ""
|
107 |
|
108 |
stream = client.text_generation(formatted_prompt, max_new_tokens=512, stream=True, details=True, return_full_text=False)
|
109 |
+
token="".join([response.token.text for response in stream if response.token.text != "</s>"])
|
110 |
+
response += token
|
111 |
+
yield response
|
112 |
|
113 |
"""
|
114 |
For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
|