Spaces:
Runtime error
Runtime error
Commit ·
a7fe07a
1
Parent(s): 92c075b
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,18 +1,19 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
import interpreter
|
| 3 |
|
| 4 |
-
# interpreter setup
|
| 5 |
|
| 6 |
def chat(input):
|
| 7 |
# chat logic
|
| 8 |
-
|
| 9 |
-
def reset():
|
| 10 |
-
# reset logic
|
| 11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
iface = gr.Interface(
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
)
|
| 17 |
|
| 18 |
iface.queue(reset, [], "button", concurrency_count=1)
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import interpreter
|
| 3 |
|
| 4 |
+
# interpreter setup
|
| 5 |
|
| 6 |
def chat(input):
|
| 7 |
# chat logic
|
|
|
|
|
|
|
|
|
|
| 8 |
|
| 9 |
+
def reset():
|
| 10 |
+
interpreter.reset()
|
| 11 |
+
return "Chat history reset"
|
| 12 |
+
|
| 13 |
iface = gr.Interface(
|
| 14 |
+
fn=chat,
|
| 15 |
+
inputs="text",
|
| 16 |
+
outputs="text"
|
| 17 |
)
|
| 18 |
|
| 19 |
iface.queue(reset, [], "button", concurrency_count=1)
|