Crackershoot commited on
Commit
054f094
Β·
verified Β·
1 Parent(s): 0dc3a88

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +29 -20
app.py CHANGED
@@ -460,6 +460,15 @@ with gr.Blocks(title="πŸ€– Dox the Data Professional's Guide πŸ€–"#,
460
  # )
461
  # example_buttons.append(btn)
462
 
 
 
 
 
 
 
 
 
 
463
  gr.HTML(
464
  """
465
  <hr>
@@ -487,30 +496,30 @@ with gr.Blocks(title="πŸ€– Dox the Data Professional's Guide πŸ€–"#,
487
  elem_id="question_box"
488
  )
489
 
490
- with gr.Row():
491
- submit_btn = gr.Button(
492
- "πŸ™‹ Ask Dox a question:",
493
- variant="primary",
494
- elem_classes=["primary-action"]
495
- )
496
 
497
  with gr.Row():
498
  ask_btn = gr.Button("Submit πŸ“€", variant="primary", elem_classes="primary-action")
499
  clear_btn = gr.Button("🧹 Clear Chat", elem_classes="clear-action")
500
  # A section for example questions.
501
- gr.Markdown("### πŸ’‘ Example Questions", elem_classes="component")
502
- examples = gr.Examples(
503
- examples=example_questions,
504
- inputs=question,
505
- outputs=[chatbot, question],
506
- fn=run_example,
507
- cache_examples=False
508
- )
509
 
510
  # πŸ‘πŸ‘Ž Feedback buttons
511
  with gr.Row():
512
- thumbs_up = gr.Button("πŸ‘ Helpful", elem_classes="component")
513
- thumbs_down = gr.Button("πŸ‘Ž Not Helpful", elem_classes="component")
514
 
515
  # Hidden feedback box (only appears on πŸ‘Ž)
516
  feedback_box = gr.Textbox(
@@ -518,16 +527,16 @@ with gr.Blocks(title="πŸ€– Dox the Data Professional's Guide πŸ€–"#,
518
  visible=False
519
  )
520
 
521
- submit_feedback_btn = gr.Button("πŸ“ Submit Feedback", visible=False, elem_classes="component")
522
- feedback_status = gr.Markdown("", elem_classes="component")
523
  # RIGHT-SIDE COLUMN: for the PDF preview.
524
  with gr.Column(scale=3):
525
- gr.Markdown("### πŸ“„ Referenced PDF Document (🌐 Empty for Web Results)", elem_classes="component")
526
  #gr.Markdown(" 🌐 Empty by default", elem_classes="component")
527
  # A hidden state to store the PDF link found in the agent's response.
528
  link_state = gr.State()
529
  # A markdown component to show PDF loading status.
530
- pdf_status = gr.Markdown(visible=False, elem_classes="component")
531
  # An image component to display the PDF preview.
532
  output_image = gr.Image(
533
  label="⬇️ Cheat Sheet Preview",
 
460
  # )
461
  # example_buttons.append(btn)
462
 
463
+ gr.Markdown("### πŸ’‘ Example Questions", elem_classes="example-button")
464
+ examples = gr.Examples(
465
+ examples=example_questions,
466
+ inputs=question,
467
+ outputs=[chatbot, question],
468
+ fn=run_example,
469
+ cache_examples=False
470
+ )
471
+
472
  gr.HTML(
473
  """
474
  <hr>
 
496
  elem_id="question_box"
497
  )
498
 
499
+ # with gr.Row():
500
+ # submit_btn = gr.Button(
501
+ # "πŸ™‹ Ask Dox a question:",
502
+ # variant="primary",
503
+ # elem_classes=["primary-action"]
504
+ # )
505
 
506
  with gr.Row():
507
  ask_btn = gr.Button("Submit πŸ“€", variant="primary", elem_classes="primary-action")
508
  clear_btn = gr.Button("🧹 Clear Chat", elem_classes="clear-action")
509
  # A section for example questions.
510
+ # gr.Markdown("### πŸ’‘ Example Questions", elem_classes="example-button")
511
+ # examples = gr.Examples(
512
+ # examples=example_questions,
513
+ # inputs=question,
514
+ # outputs=[chatbot, question],
515
+ # fn=run_example,
516
+ # cache_examples=False
517
+ # )
518
 
519
  # πŸ‘πŸ‘Ž Feedback buttons
520
  with gr.Row():
521
+ thumbs_up = gr.Button("πŸ‘ Helpful", elem_classes="clear-action")
522
+ thumbs_down = gr.Button("πŸ‘Ž Not Helpful", elem_classes="clear-action")
523
 
524
  # Hidden feedback box (only appears on πŸ‘Ž)
525
  feedback_box = gr.Textbox(
 
527
  visible=False
528
  )
529
 
530
+ submit_feedback_btn = gr.Button("πŸ“ Submit Feedback", visible=False, elem_classes="clear-action")
531
+ feedback_status = gr.Markdown("", elem_classes="clear-action")
532
  # RIGHT-SIDE COLUMN: for the PDF preview.
533
  with gr.Column(scale=3):
534
+ gr.Markdown("### πŸ“„ Referenced PDF Document (🌐 Empty for Web Results)", elem_classes="clear-action")
535
  #gr.Markdown(" 🌐 Empty by default", elem_classes="component")
536
  # A hidden state to store the PDF link found in the agent's response.
537
  link_state = gr.State()
538
  # A markdown component to show PDF loading status.
539
+ pdf_status = gr.Markdown(visible=False, elem_classes="clear-action")
540
  # An image component to display the PDF preview.
541
  output_image = gr.Image(
542
  label="⬇️ Cheat Sheet Preview",