mkw18 commited on
Commit
49fadfc
1 Parent(s): 6c375d8
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -142,15 +142,15 @@ with gr.Blocks() as demo:
142
 
143
  data=requests.post(os.environ.get("URL"), data=json.dumps(data, ensure_ascii=False).encode('utf-8')).content
144
  data = json.loads(str(data, encoding="utf-8"))
145
- chatbot = gr.Chatbot(data['chatbot'])
146
- answer = gr.State(data['answer'])
147
- idx = gr.State(data['idx'])
148
  show_ans = gr.State(False)
149
 
150
 
151
  with gr.Row():
152
  with gr.Column(scale=4):
153
- question = gr.Textbox(label='汤面', value=data['story'].strip(),
154
  lines=1, max_lines=3).style(container=False)
155
  with gr.Row():
156
  user_input = gr.Textbox(show_label=False, placeholder="请输入你的猜测...", lines=1, max_lines=3).style(
 
142
 
143
  data=requests.post(os.environ.get("URL"), data=json.dumps(data, ensure_ascii=False).encode('utf-8')).content
144
  data = json.loads(str(data, encoding="utf-8"))
145
+ chatbot = gr.Chatbot([None, '点击“再来一局”开始游戏'])
146
+ answer = gr.State('点击“再来一局”开始游戏')
147
+ idx = gr.State(0)
148
  show_ans = gr.State(False)
149
 
150
 
151
  with gr.Row():
152
  with gr.Column(scale=4):
153
+ question = gr.Textbox(label='汤面', value='点击“再来一局”开始游戏',
154
  lines=1, max_lines=3).style(container=False)
155
  with gr.Row():
156
  user_input = gr.Textbox(show_label=False, placeholder="请输入你的猜测...", lines=1, max_lines=3).style(