Elfe commited on
Commit
3ddbcdc
1 Parent(s): cc02eee

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -1,6 +1,6 @@
1
  import gradio as gr
2
 
3
- #count = 0
4
 
5
  # 修改本函数,来实现你自己的 chatbot
6
  # p: 对机器人说话的内容
@@ -9,9 +9,9 @@ import gradio as gr
9
  # 返回值:[type, content]
10
  # 详见 https://huggingface.co/spaces/baixing/hackathon_test/blob/main/bot-api.md
11
  def chat(p, qid, uid):
12
- # global count
13
- # count = count+1
14
- return ["text", f"我听到你刚说:{p}"]
15
 
16
  iface = gr.Interface(fn=chat,
17
  inputs=["text", "text", "text"],
 
1
  import gradio as gr
2
 
3
+ count = 0
4
 
5
  # 修改本函数,来实现你自己的 chatbot
6
  # p: 对机器人说话的内容
 
9
  # 返回值:[type, content]
10
  # 详见 https://huggingface.co/spaces/baixing/hackathon_test/blob/main/bot-api.md
11
  def chat(p, qid, uid):
12
+ global count
13
+ count = count+1
14
+ return ["text", f"{count} 我听到你刚说:{p}"]
15
 
16
  iface = gr.Interface(fn=chat,
17
  inputs=["text", "text", "text"],