andersonquizhpe
commited on
Commit
•
3776020
1
Parent(s):
3586dd6
Update app.py
Browse files
app.py
CHANGED
@@ -4,12 +4,27 @@ from presentation import main_title, examples
|
|
4 |
|
5 |
model = 'hackathon-pln-es/Detect-Acoso-Twitter-Es'
|
6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
def classify(text):
|
8 |
cls= pipeline("text-classification", model=model)
|
9 |
return cls(text)[0]['label']
|
10 |
|
11 |
-
gr.Interface(fn=classify, inputs=[
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
examples=examples,
|
|
|
13 |
theme="peach",
|
14 |
thumbnail="None",
|
15 |
css="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css").launch(debug=True)
|
|
|
4 |
|
5 |
model = 'hackathon-pln-es/Detect-Acoso-Twitter-Es'
|
6 |
|
7 |
+
article = """
|
8 |
+
### Miembros del equipo
|
9 |
+
- Anderson Quizhpe
|
10 |
+
- Luis Negrón
|
11 |
+
- David Pacheco
|
12 |
+
- Bryan Requenes
|
13 |
+
- Paul Pasaca
|
14 |
+
"""
|
15 |
def classify(text):
|
16 |
cls= pipeline("text-classification", model=model)
|
17 |
return cls(text)[0]['label']
|
18 |
|
19 |
+
gr.Interface(fn=classify, inputs=[gr.inputs.Textbox(
|
20 |
+
lines=10,
|
21 |
+
label="Texto a analizar:",
|
22 |
+
placeholder="Introduce o elige un ejemplo de twit:",
|
23 |
+
optional=False,
|
24 |
+
)], outputs=[gr.outputs.Textbox(label="Predicción"),
|
25 |
+
], description=main_title,
|
26 |
examples=examples,
|
27 |
+
article=article,
|
28 |
theme="peach",
|
29 |
thumbnail="None",
|
30 |
css="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css").launch(debug=True)
|