joys631 commited on
Commit
76a1fac
·
verified ·
1 Parent(s): 0482e07

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -4
app.py CHANGED
@@ -4,8 +4,15 @@
4
 
5
  import gradio as gr
6
 
7
- def echo(message, history, situation, instructions):
8
- return message + situation + instructions
9
 
10
- demo = gr.ChatInterface(fn=echo, additional_inputs=[gr.Textbox(label="Situation"), gr.Textbox(label="Instructions")], title="Echo Bot")
11
- demo.launch()
 
 
 
 
 
 
 
 
4
 
5
  import gradio as gr
6
 
7
+ def echo_with_inputs(message, history, additional_input):
8
+ return f"You said: {message}\nAdditional input: {additional_input}"
9
 
10
+ demo = gr.ChatInterface(
11
+ fn=echo_with_inputs,
12
+ examples=["hello", "hola", "merhaba"],
13
+ title="Echo Bot with Inputs",
14
+ inputs=["textbox", "textbox"],
15
+ labels=["Message", "Additional Input"],
16
+ )
17
+
18
+ demo.launch()