tbitai commited on
Commit
4ff6c22
1 Parent(s): 794464a

Work around component info font size bug in Gradio 5

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -95,15 +95,16 @@ demo = gr.Interface(
95
  fn=predict,
96
  inputs=[
97
  gr.Dropdown(choices=MODELS, value=BAYES, label="Model",
98
- info="Learn more about the models [here](https://huggingface.co/collections/tbitai/bayes-or-spam-6700033fa145e298ec849249)"),
 
99
  gr.TextArea(label="Email"),
100
  ],
101
  additional_inputs_accordion=gr.Accordion("Additional configuration for Bayes", open=False),
102
  additional_inputs=[
103
- gr.Checkbox(label="Unbias", info="Correct Graham's bias?"),
104
  gr.Slider(minimum=1, maximum=DEFAULT_INTR_THRESHOLD + 5, step=1, value=DEFAULT_INTR_THRESHOLD,
105
  label="Interestingness threshold",
106
- info=f"How many of the most interesting words to select in the probability calculation? ({DEFAULT_INTR_THRESHOLD} for Graham)"),
107
  ],
108
  outputs=[gr.Number(label="Spam probability")],
109
  title="Bayes or Spam?",
 
95
  fn=predict,
96
  inputs=[
97
  gr.Dropdown(choices=MODELS, value=BAYES, label="Model",
98
+ # FIXME: Font size should be smaller by default. Remove workaround when fixed in Gradio: https://github.com/gradio-app/gradio/issues/9642
99
+ info="<small>Learn more about the models [here](https://huggingface.co/collections/tbitai/bayes-or-spam-6700033fa145e298ec849249)</small>"),
100
  gr.TextArea(label="Email"),
101
  ],
102
  additional_inputs_accordion=gr.Accordion("Additional configuration for Bayes", open=False),
103
  additional_inputs=[
104
+ gr.Checkbox(label="Unbias", info="<small>Correct Graham's bias?</small>"),
105
  gr.Slider(minimum=1, maximum=DEFAULT_INTR_THRESHOLD + 5, step=1, value=DEFAULT_INTR_THRESHOLD,
106
  label="Interestingness threshold",
107
+ info=f"<small>How many of the most interesting words to select in the probability calculation? ({DEFAULT_INTR_THRESHOLD} for Graham)</small>"),
108
  ],
109
  outputs=[gr.Number(label="Spam probability")],
110
  title="Bayes or Spam?",