File size: 798 Bytes
18fcef9
 
 
 
be41074
8cf9615
 
be41074
 
18fcef9
 
 
 
fb73c99
 
 
 
 
 
fdbe424
 
 
 
a96982b
 
fb73c99
a96982b
fdbe424
 
a96982b
 
fb73c99
18fcef9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# App
from get_predictions import get_predictions
import gradio

"""
@todo refactor code + fix nltk download
@body change file directory, 
"""


if __name__ == "__main__":
    interface = gradio.Interface(
        get_predictions,
        inputs=gradio.inputs.Textbox(
            lines=2,
            placeholder="Enter The Text",
            default="",
            label="Text to Predict",
        ),
        outputs=[
            gradio.outputs.Textbox(type="auto", label="Aggression Prediction"),
            gradio.outputs.Textbox(type="auto", label="Misogyny Prediction"),
        ],
        title="Aggression and Misogyny Predictor",
        theme="dark-huggingface",
        live=True,
    )

    # Launch the interface
    interface.launch(
        share=False,
        debug=True,
    )