Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -40,11 +40,10 @@ def generate(
|
|
40 |
|
41 |
stream = client.text_generation(formatted_prompt, **generate_kwargs, stream=True, details=True, return_full_text=False)
|
42 |
|
43 |
-
|
44 |
for response in stream:
|
45 |
-
|
46 |
-
|
47 |
-
yield output
|
48 |
|
49 |
additional_inputs = [
|
50 |
gr.Textbox(label="System Prompt", max_lines=1, interactive=True),
|
|
|
40 |
|
41 |
stream = client.text_generation(formatted_prompt, **generate_kwargs, stream=True, details=True, return_full_text=False)
|
42 |
|
43 |
+
output_text = ""
|
44 |
for response in stream:
|
45 |
+
output_text += response.token.text
|
46 |
+
yield output_text, history # Yield the updated output_text and the updated history
|
|
|
47 |
|
48 |
additional_inputs = [
|
49 |
gr.Textbox(label="System Prompt", max_lines=1, interactive=True),
|