Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -23,8 +23,9 @@ def generate_text(input_text, history):
|
|
23 |
output = llm(input_text_with_history, max_tokens=1024, stop=["Q:", "\n"], stream=True)
|
24 |
for out in output:
|
25 |
stream = copy.deepcopy(out)
|
26 |
-
|
27 |
history =["init",input_text_with_history]
|
|
|
28 |
|
29 |
|
30 |
demo = gr.ChatInterface(generate_text)
|
|
|
23 |
output = llm(input_text_with_history, max_tokens=1024, stop=["Q:", "\n"], stream=True)
|
24 |
for out in output:
|
25 |
stream = copy.deepcopy(out)
|
26 |
+
print(stream["choices"][0]["text"])
|
27 |
history =["init",input_text_with_history]
|
28 |
+
yield stream
|
29 |
|
30 |
|
31 |
demo = gr.ChatInterface(generate_text)
|