Spaces:
Sleeping
Sleeping
aaaaa
Browse files
app.py
CHANGED
@@ -50,10 +50,10 @@ def respond(
|
|
50 |
token = message_chunk.choices[0].delta.content
|
51 |
response += token
|
52 |
history[-1] = (message, response)
|
53 |
-
yield history
|
54 |
|
55 |
# Finalize response in history
|
56 |
-
history
|
57 |
yield history
|
58 |
|
59 |
def cancel_inference():
|
@@ -142,4 +142,4 @@ with gr.Blocks(css=custom_css) as demo:
|
|
142 |
cancel_button.click(cancel_inference)
|
143 |
|
144 |
if __name__ == "__main__":
|
145 |
-
demo.launch(share=True
|
|
|
50 |
token = message_chunk.choices[0].delta.content
|
51 |
response += token
|
52 |
history[-1] = (message, response)
|
53 |
+
yield history # Yield the history list of tuples
|
54 |
|
55 |
# Finalize response in history
|
56 |
+
history[-1] = (message, response) # Update with the full response
|
57 |
yield history
|
58 |
|
59 |
def cancel_inference():
|
|
|
142 |
cancel_button.click(cancel_inference)
|
143 |
|
144 |
if __name__ == "__main__":
|
145 |
+
demo.launch(share=False) # Remove share=True because it's not supported on HF Spaces
|