Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -69,6 +69,7 @@ def generate(
|
|
69 |
outputs.append(text)
|
70 |
yield "".join(outputs)
|
71 |
|
|
|
72 |
chat_interface = gr.ChatInterface(
|
73 |
fn=generate,
|
74 |
additional_inputs=[
|
@@ -102,7 +103,7 @@ chat_interface = gr.ChatInterface(
|
|
102 |
value=1.1,
|
103 |
),
|
104 |
],
|
105 |
-
stop_btn=
|
106 |
examples=[
|
107 |
["Hello there! How are you doing?"],
|
108 |
["Can you explain briefly to me what is the Python programming language?"],
|
@@ -112,6 +113,7 @@ chat_interface = gr.ChatInterface(
|
|
112 |
],
|
113 |
)
|
114 |
|
|
|
115 |
with gr.Blocks(css="style.css") as demo:
|
116 |
chat_interface.render()
|
117 |
|
|
|
69 |
outputs.append(text)
|
70 |
yield "".join(outputs)
|
71 |
|
72 |
+
stop_button = gr.Button(text="Stop")
|
73 |
chat_interface = gr.ChatInterface(
|
74 |
fn=generate,
|
75 |
additional_inputs=[
|
|
|
103 |
value=1.1,
|
104 |
),
|
105 |
],
|
106 |
+
stop_btn=stop_button, # Use the created stop button instance
|
107 |
examples=[
|
108 |
["Hello there! How are you doing?"],
|
109 |
["Can you explain briefly to me what is the Python programming language?"],
|
|
|
113 |
],
|
114 |
)
|
115 |
|
116 |
+
|
117 |
with gr.Blocks(css="style.css") as demo:
|
118 |
chat_interface.render()
|
119 |
|