Update app.py
Browse files
app.py
CHANGED
@@ -28,17 +28,6 @@ model_list = [
|
|
28 |
"knowhate/HateBERTimbau-yt-tt",
|
29 |
]
|
30 |
|
31 |
-
user_friendly_name = {
|
32 |
-
"knowhate/HateBERTimbau": "HateBERTimbau (Original)",
|
33 |
-
"knowhate/HateBERTimbau-youtube": "HateBERTimbau (YouTube)",
|
34 |
-
"knowhate/HateBERTimbau-twitter": "HateBERTimbau (Twitter)",
|
35 |
-
"knowhate/HateBERTimbau-yt-tt": "HateBERTimbau (YouTube + Twitter)"
|
36 |
-
}
|
37 |
-
|
38 |
-
reverse_user_friendly_name = { v:k for k,v in user_friendly_name.items() }
|
39 |
-
|
40 |
-
user_friendly_name_list = list(user_friendly_name.values())
|
41 |
-
|
42 |
#pipe = pipeline("text-classification", model="knowhate/HateBERTimbau")
|
43 |
#demo = gr.Interface.from_pipeline(pipe)
|
44 |
#demo.launch()
|
@@ -57,12 +46,11 @@ def predict(s1, chosen_model):
|
|
57 |
|
58 |
inputs = [
|
59 |
gr.Textbox(label="Text", value=app_examples[0][0]),
|
60 |
-
gr.Dropdown(label="Model", choices=
|
61 |
]
|
62 |
|
63 |
outputs = [
|
64 |
gr.Label(label="Result"),
|
65 |
-
gr.Markdown(),
|
66 |
]
|
67 |
|
68 |
|
|
|
28 |
"knowhate/HateBERTimbau-yt-tt",
|
29 |
]
|
30 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
#pipe = pipeline("text-classification", model="knowhate/HateBERTimbau")
|
32 |
#demo = gr.Interface.from_pipeline(pipe)
|
33 |
#demo.launch()
|
|
|
46 |
|
47 |
inputs = [
|
48 |
gr.Textbox(label="Text", value=app_examples[0][0]),
|
49 |
+
gr.Dropdown(label="Model", choices=model_list, value=model_list[0])
|
50 |
]
|
51 |
|
52 |
outputs = [
|
53 |
gr.Label(label="Result"),
|
|
|
54 |
]
|
55 |
|
56 |
|