MatteoFasulo commited on
Commit
99b2813
·
1 Parent(s): f3b8813

Update dashboard title and description

Browse files
Files changed (1) hide show
  1. app.py +13 -3
app.py CHANGED
@@ -135,7 +135,11 @@ def predict(phrase: str, finetuned_model: str):
135
  demo = gr.Interface(
136
  fn=predict,
137
  inputs=[
138
- "textbox",
 
 
 
 
139
  gr.Dropdown([
140
  "MatteoFasulo/twitter-roberta-base-hate_69",
141
  "MatteoFasulo/twitter-roberta-base-hate_1337",
@@ -145,10 +149,16 @@ demo = gr.Interface(
145
  "MatteoFasulo/xlm-roberta-base_42",
146
  ],
147
  label="Model",
148
- info="Choose the model to use for prediction.",
149
  )
150
  ],
151
- outputs="text",
 
 
 
 
 
 
152
  )
153
 
154
  demo.launch()
 
135
  demo = gr.Interface(
136
  fn=predict,
137
  inputs=[
138
+ gr.Textbox(
139
+ label="Phrase",
140
+ placeholder="Enter a phrase to check if it is sexist or not.",
141
+ info="Enter a phrase to check if it is sexist or not.",
142
+ ),
143
  gr.Dropdown([
144
  "MatteoFasulo/twitter-roberta-base-hate_69",
145
  "MatteoFasulo/twitter-roberta-base-hate_1337",
 
149
  "MatteoFasulo/xlm-roberta-base_42",
150
  ],
151
  label="Model",
152
+ info="Choose the model to use for prediction. XLM-RoBERTa models are suitable for multilingual text.",
153
  )
154
  ],
155
+ outputs=gr.Text(
156
+ label="Prediction",
157
+ info="The prediction of the model on the input phrase.",
158
+ ),
159
+ title="Sexism Detection",
160
+ description="A small demo to check if a phrase is sexist or not using a fine-tuned RoBERTa model on hate speech detection.",
161
+ theme="huggingface",
162
  )
163
 
164
  demo.launch()