Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -2,7 +2,11 @@ import gradio as gr
|
|
2 |
|
3 |
def echo(message, history, new_param):
|
4 |
# Use the new_param in your function logic
|
5 |
-
|
|
|
|
|
6 |
|
7 |
-
|
|
|
|
|
8 |
demo.launch()
|
|
|
2 |
|
3 |
def echo(message, history, new_param):
|
4 |
# Use the new_param in your function logic
|
5 |
+
history.append(new_param)
|
6 |
+
history.append(message)
|
7 |
+
return history
|
8 |
|
9 |
+
new_param_input = gr.Textbox(label="New Parameter")
|
10 |
+
|
11 |
+
demo = gr.ChatInterface(fn=echo, examples=["hello", "hola", "merhaba"], title="Echo Bot", additional_inputs=new_param_input)
|
12 |
demo.launch()
|