zxcgqq commited on
Commit
c0202b6
·
1 Parent(s): e648158

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,6 +1,6 @@
1
  import gradio as gr
2
 
3
- def run_text(text, state):
4
  res = "hello"
5
  state = state + [(text, res)]
6
  return state,state
@@ -26,7 +26,7 @@ with gr.Blocks(css="#chatbot {overflow:auto; height:500px;}") as demo:
26
  with gr.Column(scale=0.20, min_width=0):
27
  clear = gr.Button("🔄Clear️")
28
 
29
- txt.submit(run_text, [txt, state], [chatbot,state])
30
  txt.submit(lambda: "", None, txt)
31
  run.click(run_text, [txt, state], [chatbot,state])
32
 
 
1
  import gradio as gr
2
 
3
+ def run_text(text, state, lang):
4
  res = "hello"
5
  state = state + [(text, res)]
6
  return state,state
 
26
  with gr.Column(scale=0.20, min_width=0):
27
  clear = gr.Button("🔄Clear️")
28
 
29
+ txt.submit(run_text, [txt, state,lang], [chatbot,state])
30
  txt.submit(lambda: "", None, txt)
31
  run.click(run_text, [txt, state], [chatbot,state])
32