Jaamie commited on
Commit
4f72911
Β·
verified Β·
1 Parent(s): ee06014

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -2
app.py CHANGED
@@ -451,8 +451,25 @@ logs_tab = gr.Interface(
451
 
452
 
453
  # πŸ“ Anonymous Feedback
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
454
  feedback_tab = gr.Interface(
455
- fn=lambda fb, inp_type, query, diag, score, status: submit_feedback(fb, inp_type, query, diag, score, status),
456
  inputs=[
457
  gr.Textbox(label="πŸ“ Feedback"),
458
  gr.Textbox(label="Input Type"),
@@ -461,11 +478,12 @@ feedback_tab = gr.Interface(
461
  gr.Textbox(label="Confidence Score"),
462
  gr.Textbox(label="Status")
463
  ],
464
- outputs="text",
465
  title="πŸ“ Submit Feedback With Session Metadata"
466
  )
467
 
468
 
 
469
  feedback_download_tab = gr.Interface(
470
  fn=download_feedback_log,
471
  inputs=[],
 
451
 
452
 
453
  # πŸ“ Anonymous Feedback
454
+ # feedback_tab = gr.Interface(
455
+ # fn=lambda fb, inp_type, query, diag, score, status: submit_feedback(fb, inp_type, query, diag, score, status),
456
+ # inputs=[
457
+ # gr.Textbox(label="πŸ“ Feedback"),
458
+ # gr.Textbox(label="Input Type"),
459
+ # gr.Textbox(label="Query"),
460
+ # gr.Textbox(label="Diagnosis"),
461
+ # gr.Textbox(label="Confidence Score"),
462
+ # gr.Textbox(label="Status")
463
+ # ],
464
+ # outputs="text",
465
+ # title="πŸ“ Submit Feedback With Session Metadata"
466
+ # )
467
+
468
+ def feedback_handler(fb, inp_type, query, diag, score, status):
469
+ return submit_feedback(fb, inp_type, query, diag, score, status)
470
+
471
  feedback_tab = gr.Interface(
472
+ fn=feedback_handler,
473
  inputs=[
474
  gr.Textbox(label="πŸ“ Feedback"),
475
  gr.Textbox(label="Input Type"),
 
478
  gr.Textbox(label="Confidence Score"),
479
  gr.Textbox(label="Status")
480
  ],
481
+ outputs=gr.Textbox(label="πŸ“¬ Submission Status"),
482
  title="πŸ“ Submit Feedback With Session Metadata"
483
  )
484
 
485
 
486
+
487
  feedback_download_tab = gr.Interface(
488
  fn=download_feedback_log,
489
  inputs=[],