Skip to content

Commit

Permalink
Hide button hints in compress only mode
Browse files Browse the repository at this point in the history
  • Loading branch information
cornzz committed Sep 18, 2024
1 parent f2284d0 commit 57eb14e
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,16 +304,17 @@ def run_demo(
response_a_obj = gr.Textbox(label="Response A", visible=False)
response_b = gr.Textbox(label="LLM Response B", lines=10, max_lines=10, autoscroll=False, interactive=False)
response_b_obj = gr.Textbox(label="Response B", visible=False)
with gr.Row() as flag_buttons:
a_yes = gr.Button("✅", interactive=False)
a_no = gr.Button("❌", interactive=False)
b_yes = gr.Button("✅", interactive=False)
b_no = gr.Button("❌", interactive=False)
FLAG_BUTTONS = [a_yes, a_no, b_yes, b_no]
gr.Markdown(
'<div class="button-hint">✅ = answered your question / solved your problem'
"&nbsp;&nbsp;&nbsp; ❌ = did not answer your question / solve your problem.</div>"
)
with gr.Column() as flag_buttons:
with gr.Row():
a_yes = gr.Button("✅", interactive=False)
a_no = gr.Button("❌", interactive=False)
b_yes = gr.Button("✅", interactive=False)
b_no = gr.Button("❌", interactive=False)
FLAG_BUTTONS = [a_yes, a_no, b_yes, b_no]
gr.Markdown(
'<div class="button-hint">✅ = answered your question / solved your problem'
"&nbsp;&nbsp;&nbsp; ❌ = did not answer your question / solve your problem.</div>"
)

# Examples
gr.Markdown('<h2 style="text-align: center">Examples</div>')
Expand Down

0 comments on commit 57eb14e

Please sign in to comment.