Peijie commited on
Commit
a209c09
1 Parent(s): 964b9cd

change description of the demo.

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -314,11 +314,11 @@ def on_predict_button_click_xclip(textbox_input: str):
314
 
315
  xclip_color = "green" if xclip_label.strip() == gt_class.state.strip() else "red"
316
  xclip_pred_markdown = f"""
317
- ### <span style='color:{xclip_color}'>XCLIP: {xclip_label} &nbsp;&nbsp;&nbsp; {xclip_pred_score:.4f}</span>
318
  """
319
  custom_color = "green" if custom_label.strip() == gt_class.state.strip() else "red"
320
  custom_pred_markdown = f"""
321
- ### <span style='color:{custom_color}'>XCLIP: {custom_label} &nbsp;&nbsp;&nbsp; {custom_pred_score:.4f}</span>
322
  """
323
  textbox = gr.Textbox.update(visible=False)
324
  # return textbox, xclip_pred_markdown, xclip_explanation, custom_pred_markdown, modified_explanation
@@ -361,7 +361,11 @@ with gr.Blocks(theme=gr.themes.Soft(), css=custom_css, title="PEEB") as demo:
361
  with gr.Column():
362
  title_text = gr.Markdown("# PEEB - demo")
363
  gr.Markdown(
364
- "- In this demo, you can edit the descriptions of a class and see how to model react to it."
 
 
 
 
365
  )
366
 
367
  # display the gallery of images
 
314
 
315
  xclip_color = "green" if xclip_label.strip() == gt_class.state.strip() else "red"
316
  xclip_pred_markdown = f"""
317
+ ### <span style='color:{xclip_color}'> {xclip_label} &nbsp;&nbsp;&nbsp; {xclip_pred_score:.4f}</span>
318
  """
319
  custom_color = "green" if custom_label.strip() == gt_class.state.strip() else "red"
320
  custom_pred_markdown = f"""
321
+ ### <span style='color:{custom_color}'> {custom_label} &nbsp;&nbsp;&nbsp; {custom_pred_score:.4f}</span>
322
  """
323
  textbox = gr.Textbox.update(visible=False)
324
  # return textbox, xclip_pred_markdown, xclip_explanation, custom_pred_markdown, modified_explanation
 
361
  with gr.Column():
362
  title_text = gr.Markdown("# PEEB - demo")
363
  gr.Markdown(
364
+ """
365
+ - In this demo a demo for PEEB paper (NAACL finding 2024).
366
+ - paper: https://arxiv.org/abs/2403.05297
367
+ - code: https://github.com/anguyen8/peeb/tree/inspect_ddp
368
+ """
369
  )
370
 
371
  # display the gallery of images