Commit
·
fab9437
1
Parent(s):
ae4b30a
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
import gradio as gr
|
2 |
from transformers import pipeline
|
3 |
from presentation import main_title, examples
|
|
|
4 |
|
5 |
model = 'hackathon-pln-es/Detect-Acoso-Twitter-Es'
|
6 |
|
@@ -18,6 +19,7 @@ def classify(text):
|
|
18 |
return cls(text)[0]['label']
|
19 |
|
20 |
gr.Interface(fn=classify, inputs=[gr.inputs.Textbox(
|
|
|
21 |
label="Texto a analizar:",
|
22 |
placeholder="Introduce o elige un ejemplo de twit:",
|
23 |
optional=False,
|
|
|
1 |
import gradio as gr
|
2 |
from transformers import pipeline
|
3 |
from presentation import main_title, examples
|
4 |
+
from typing_extensions import Required
|
5 |
|
6 |
model = 'hackathon-pln-es/Detect-Acoso-Twitter-Es'
|
7 |
|
|
|
19 |
return cls(text)[0]['label']
|
20 |
|
21 |
gr.Interface(fn=classify, inputs=[gr.inputs.Textbox(
|
22 |
+
Required,
|
23 |
label="Texto a analizar:",
|
24 |
placeholder="Introduce o elige un ejemplo de twit:",
|
25 |
optional=False,
|