Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -4,13 +4,13 @@ from transformers import pipeline
|
|
4 |
app = gr.Blocks()
|
5 |
|
6 |
model_id_1 = "nlptown/bert-base-multilingual-uncased-sentiment"
|
7 |
-
model_id_2 = "microsoft/deberta-
|
8 |
model_id_3 = "distilbert-base-uncased-finetuned-sst-2-english"
|
9 |
model_id_4 = "lordtt13/emo-mobilebert"
|
10 |
model_id_5 = "juliensimon/reviews-sentiment-analysis"
|
11 |
model_id_6 = "sbcBI/sentiment_analysis_model"
|
12 |
|
13 |
-
def parse_output(output_json):
|
14 |
list_pred=[]
|
15 |
for i in range(len(output_json[0])):
|
16 |
label = output_json[0][i]['label']
|
@@ -50,7 +50,7 @@ with app:
|
|
50 |
btn1 = gr.Button("Predict - Model 1")
|
51 |
gr.Markdown(
|
52 |
"""
|
53 |
-
Model 2 = microsoft/deberta-
|
54 |
""")
|
55 |
btn2 = gr.Button("Predict - Model 2")
|
56 |
gr.Markdown(
|
|
|
4 |
app = gr.Blocks()
|
5 |
|
6 |
model_id_1 = "nlptown/bert-base-multilingual-uncased-sentiment"
|
7 |
+
model_id_2 = "microsoft/deberta-xlarge-mnli"
|
8 |
model_id_3 = "distilbert-base-uncased-finetuned-sst-2-english"
|
9 |
model_id_4 = "lordtt13/emo-mobilebert"
|
10 |
model_id_5 = "juliensimon/reviews-sentiment-analysis"
|
11 |
model_id_6 = "sbcBI/sentiment_analysis_model"
|
12 |
|
13 |
+
def parse_output(output_json):
|
14 |
list_pred=[]
|
15 |
for i in range(len(output_json[0])):
|
16 |
label = output_json[0][i]['label']
|
|
|
50 |
btn1 = gr.Button("Predict - Model 1")
|
51 |
gr.Markdown(
|
52 |
"""
|
53 |
+
Model 2 = microsoft/deberta-xlarge-mnli
|
54 |
""")
|
55 |
btn2 = gr.Button("Predict - Model 2")
|
56 |
gr.Markdown(
|