DeepLearning101 commited on
Commit
1ace023
·
verified ·
1 Parent(s): ccce7ef

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -171,7 +171,7 @@ with gr.Blocks() as iface:
171
  gr.Examples(examples=examples, inputs=user_input)
172
 
173
  with gr.Row():
174
- like_button = gr.Button(" 👍 覺得答案很棒,請按我;或者直接繼續問新問題亦可")
175
  dislike_button = gr.Button(" 👎 覺得答案待改善,請輸入改進建議,再按我送出保存")
176
  improvement_input = gr.Textbox(label='請輸入改進建議', placeholder='請輸入如何改進模型回應的建議')
177
 
@@ -188,11 +188,11 @@ with gr.Blocks() as iface:
188
 
189
  submit_button.click(fn=chat, inputs=[user_input, chatbot], outputs=[chatbot, chatbot])
190
 
191
- like_button.click(
192
- fn=lambda response, improvement: handle_feedback(response, "like", improvement),
193
- inputs=[chatbot, improvement_input],
194
- outputs=feedback_output
195
- )
196
 
197
  dislike_button.click(
198
  fn=lambda response, improvement: handle_feedback(response, "dislike", improvement),
 
171
  gr.Examples(examples=examples, inputs=user_input)
172
 
173
  with gr.Row():
174
+ # like_button = gr.Button(" 👍 覺得答案很棒,請按我;或者直接繼續問新問題亦可")
175
  dislike_button = gr.Button(" 👎 覺得答案待改善,請輸入改進建議,再按我送出保存")
176
  improvement_input = gr.Textbox(label='請輸入改進建議', placeholder='請輸入如何改進模型回應的建議')
177
 
 
188
 
189
  submit_button.click(fn=chat, inputs=[user_input, chatbot], outputs=[chatbot, chatbot])
190
 
191
+ # like_button.click(
192
+ # fn=lambda response, improvement: handle_feedback(response, "like", improvement),
193
+ # inputs=[chatbot, improvement_input],
194
+ # outputs=feedback_output
195
+ # )
196
 
197
  dislike_button.click(
198
  fn=lambda response, improvement: handle_feedback(response, "dislike", improvement),