Spaces:
Sleeping
Sleeping
Added Custom Input and Live Prediction
Browse files
app.py
CHANGED
@@ -6,11 +6,18 @@ import gradio
|
|
6 |
if __name__ == "__main__":
|
7 |
interface = gradio.Interface(
|
8 |
get_predictions,
|
9 |
-
inputs=
|
|
|
|
|
|
|
|
|
|
|
10 |
outputs=["text", "text"],
|
11 |
title="Aggression and Misogyny Predictor",
|
12 |
theme="dark-huggingface",
|
|
|
13 |
)
|
14 |
interface.launch(
|
15 |
share=False,
|
|
|
16 |
)
|
|
|
6 |
if __name__ == "__main__":
|
7 |
interface = gradio.Interface(
|
8 |
get_predictions,
|
9 |
+
inputs=gradio.inputs.Textbox(
|
10 |
+
lines=2,
|
11 |
+
placeholder="Enter The Text",
|
12 |
+
default="",
|
13 |
+
label="Text to Predict",
|
14 |
+
),
|
15 |
outputs=["text", "text"],
|
16 |
title="Aggression and Misogyny Predictor",
|
17 |
theme="dark-huggingface",
|
18 |
+
live=True,
|
19 |
)
|
20 |
interface.launch(
|
21 |
share=False,
|
22 |
+
debug=True,
|
23 |
)
|