Spaces:
Sleeping
Sleeping
First true version
Browse files
app.py
CHANGED
@@ -60,11 +60,11 @@ def predict(text):
|
|
60 |
is_toxic = detect_toxicity(text)
|
61 |
return f"Is toxic: {is_toxic}"
|
62 |
|
63 |
-
# Création de l'interface Gradio
|
64 |
iface = gr.Interface(
|
65 |
fn=predict,
|
66 |
-
inputs=gr.
|
67 |
-
outputs="
|
68 |
title="Détecteur de Toxicité",
|
69 |
description="Entrez un texte en français pour vérifier s'il est toxique."
|
70 |
)
|
|
|
60 |
is_toxic = detect_toxicity(text)
|
61 |
return f"Is toxic: {is_toxic}"
|
62 |
|
63 |
+
# Création de l'interface Gradio avec la nouvelle syntaxe
|
64 |
iface = gr.Interface(
|
65 |
fn=predict,
|
66 |
+
inputs=gr.Textbox(lines=5, label="Texte en français"),
|
67 |
+
outputs=gr.Textbox(label="Résultat"),
|
68 |
title="Détecteur de Toxicité",
|
69 |
description="Entrez un texte en français pour vérifier s'il est toxique."
|
70 |
)
|