Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -61,24 +61,15 @@ def classify_gender(text: str) -> dict:
|
|
| 61 |
DESCRIPTION = """
|
| 62 |
## Bilingual Gender Classifier
|
| 63 |
This is a demo for the private model `breadlicker45/bilingual-large-gender-v4-test`.
|
| 64 |
-
Enter a sentence
|
| 65 |
-
**Disclaimer:** This model, like any AI, can have biases and may not always be accurate.
|
| 66 |
"""
|
| 67 |
|
| 68 |
ARTICLE = """
|
| 69 |
-
<div style='text-align: center;'>
|
| 70 |
-
<p>Model based on <a href='https://huggingface.co/xlm-roberta-large' target='_blank'>XLM-RoBERTa-Large</a>, fine-tuned for gender classification.</p>
|
| 71 |
-
<p>This is a private model, but you can find more public models on the <a href='https://huggingface.co/models' target='_blank'>Hugging Face Hub</a>.</p>
|
| 72 |
-
</div>
|
| 73 |
"""
|
| 74 |
|
| 75 |
examples = [
|
| 76 |
-
["
|
| 77 |
-
["La doctora le recetó un medicamento a su paciente."],
|
| 78 |
-
["The development team will present their findings tomorrow."],
|
| 79 |
-
["My sister is the best programmer I know."],
|
| 80 |
-
["El futbolista marcó el gol decisivo."],
|
| 81 |
-
["The flight crew is preparing for takeoff."]
|
| 82 |
]
|
| 83 |
|
| 84 |
with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
@@ -89,7 +80,7 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
| 89 |
text_input = gr.Textbox(
|
| 90 |
lines=5,
|
| 91 |
label="Input Text",
|
| 92 |
-
placeholder="Enter a sentence in
|
| 93 |
)
|
| 94 |
submit_btn = gr.Button("Classify Text", variant="primary")
|
| 95 |
|
|
|
|
| 61 |
DESCRIPTION = """
|
| 62 |
## Bilingual Gender Classifier
|
| 63 |
This is a demo for the private model `breadlicker45/bilingual-large-gender-v4-test`.
|
| 64 |
+
Enter a sentence and the model will predict whether the text has a male, female, or non-binary.
|
| 65 |
+
**Disclaimer:** This model, like any AI, can have biases and may not always be accurate.
|
| 66 |
"""
|
| 67 |
|
| 68 |
ARTICLE = """
|
|
|
|
|
|
|
|
|
|
|
|
|
| 69 |
"""
|
| 70 |
|
| 71 |
examples = [
|
| 72 |
+
["this is a test.]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 73 |
]
|
| 74 |
|
| 75 |
with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
|
|
| 80 |
text_input = gr.Textbox(
|
| 81 |
lines=5,
|
| 82 |
label="Input Text",
|
| 83 |
+
placeholder="Enter a sentence in here..."
|
| 84 |
)
|
| 85 |
submit_btn = gr.Button("Classify Text", variant="primary")
|
| 86 |
|