KiraPGR commited on
Commit
bf265cb
·
verified ·
1 Parent(s): 4ebcf5f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
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
- return message
 
 
6
 
7
- demo = gr.ChatInterface(fn=echo, examples=["hello", "hola", "merhaba"], title="Echo Bot", new_param="value")
 
 
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()