wenkai commited on
Commit
bece41e
·
verified ·
1 Parent(s): 491d478

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -8
app.py CHANGED
@@ -240,7 +240,19 @@ with gr.Blocks(css=css) as demo:
240
  with gr.Column():
241
  # output_text = gr.Textbox(label="Output Text")
242
  with gr.Accordion('Prediction:', open=True):
243
- output_markdown = gr.Markdown(label="Output")
 
 
 
 
 
 
 
 
 
 
 
 
244
  # O14813 train index 127, 266, 738, 1060 test index 4
245
  gr.Examples(
246
  examples=[
@@ -258,12 +270,8 @@ with gr.Blocks(css=css) as demo:
258
  label='Try examples'
259
  )
260
  submit_btn.click(generate_caption, [input_protein, prompt], [output_markdown])
261
- with gr.Tab(label="Your feedback"):
262
- with gr.Row():
263
- with gr.Column():
264
- inputs = gr.Textbox(type="text")
265
- output_markdown = gr.Markdown(label="Output")
266
- feedback_btn = gr.Button(value="Submit")
267
- feedback_btn.click(save_feedback, [inputs], [output_markdown])
268
  demo.launch(debug=True)
269
 
 
240
  with gr.Column():
241
  # output_text = gr.Textbox(label="Output Text")
242
  with gr.Accordion('Prediction:', open=True):
243
+ # output_markdown = gr.Markdown(label="Output")
244
+ output_markdown = gr.Chatbot()
245
+ output_markdown.like(vote, None, None)
246
+ gr.ChatInterface(fn=yes, type="messages", chatbot=output_markdown)
247
+ # with gr.Row(label="Your feedback"):
248
+ # chatbot = gr.Chatbot(placeholder="<strong>Is this prediction helpful?</strong><br>")
249
+ # chatbot.like(vote, None, None)
250
+ # gr.ChatInterface(fn=yes, type="messages", chatbot=chatbot)
251
+ # with gr.Row(label="Your feedback"):
252
+ # with gr.Column():
253
+ # inputs = gr.Textbox(type="text")
254
+ # output_markdown = gr.Markdown(label="Output")
255
+ # feedback_btn = gr.Button(value="Submit")
256
  # O14813 train index 127, 266, 738, 1060 test index 4
257
  gr.Examples(
258
  examples=[
 
270
  label='Try examples'
271
  )
272
  submit_btn.click(generate_caption, [input_protein, prompt], [output_markdown])
273
+ # feedback_btn.click(save_feedback, [inputs], [output_markdown])
274
+
275
+
 
 
 
 
276
  demo.launch(debug=True)
277