Spaces:
Runtime error
Runtime error
Javier Beltrán
commited on
Commit
•
79545fc
1
Parent(s):
e121820
UI details
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ def predict(text):
|
|
7 |
prediction = pipe(text, return_all_scores=True)[0]
|
8 |
return {"Toxic": prediction[0]["score"], "Very Toxic": prediction[1]["score"]}
|
9 |
|
10 |
-
interface = gr.Interface(predict, gr.inputs.Textbox(placeholder="Paste a tweet here", label="Tweet text", lines=
|
11 |
gr.outputs.Label(num_top_classes=2, label="This tweet is..."),
|
12 |
capture_session=True, interpretation=None,
|
13 |
title="Is your favorite Spanish politician toxic on Twitter? Test it here!",
|
|
|
7 |
prediction = pipe(text, return_all_scores=True)[0]
|
8 |
return {"Toxic": prediction[0]["score"], "Very Toxic": prediction[1]["score"]}
|
9 |
|
10 |
+
interface = gr.Interface(predict, gr.inputs.Textbox(placeholder="Paste a tweet here", label="Tweet text", lines=5),
|
11 |
gr.outputs.Label(num_top_classes=2, label="This tweet is..."),
|
12 |
capture_session=True, interpretation=None,
|
13 |
title="Is your favorite Spanish politician toxic on Twitter? Test it here!",
|