Commit
·
fca027b
1
Parent(s):
793061a
feat: add 12500 size model
Browse files
app.py
CHANGED
@@ -15,6 +15,9 @@ scademy_500_500_model = pipeline("sentiment-analysis", model=scademy_500_500_mod
|
|
15 |
scademy_2500_2500_model_name = "scademy/bert-finetuned-2500-2500-0"
|
16 |
scademy_2500_2500_model = pipeline("sentiment-analysis", model=scademy_2500_2500_model_name, token=token)
|
17 |
|
|
|
|
|
|
|
18 |
fine_tuned_model_name = "distilbert-base-uncased-finetuned-sst-2-english"
|
19 |
fine_tuned_model = pipeline("sentiment-analysis", model=fine_tuned_model_name)
|
20 |
|
@@ -22,11 +25,13 @@ def get_model_output(input_text, model_choice):
|
|
22 |
raw_result = raw_model(input_text)
|
23 |
scademy_500_500_result = scademy_500_500_model(input_text)
|
24 |
scademy_2500_2500_result = scademy_2500_2500_model(input_text)
|
|
|
25 |
fine_tuned_result = fine_tuned_model(input_text)
|
26 |
return (
|
27 |
format_model_output(raw_result[0]),
|
28 |
format_model_output(scademy_500_500_result[0]),
|
29 |
format_model_output(scademy_2500_2500_result[0]),
|
|
|
30 |
format_model_output(fine_tuned_result[0])
|
31 |
)
|
32 |
|
@@ -43,6 +48,7 @@ iface = gr.Interface(
|
|
43 |
gr.Textbox(label="Base DistilBERT output (distilbert-base-uncased)"),
|
44 |
gr.Textbox(label="Scademy DistilBERT 500-500 output"),
|
45 |
gr.Textbox(label="Scademy DistilBERT 2500-2500 output"),
|
|
|
46 |
gr.Textbox(label="Fine-tuned DistilBERT output"),
|
47 |
],
|
48 |
)
|
|
|
15 |
scademy_2500_2500_model_name = "scademy/bert-finetuned-2500-2500-0"
|
16 |
scademy_2500_2500_model = pipeline("sentiment-analysis", model=scademy_2500_2500_model_name, token=token)
|
17 |
|
18 |
+
scademy_12500_12500_model_name = "scademy/bert-finetuned-12500-12500-0"
|
19 |
+
scademy_12500_12500_model = pipeline("sentiment-analysis", model=scademy_12500_12500_model_name, token=token)
|
20 |
+
|
21 |
fine_tuned_model_name = "distilbert-base-uncased-finetuned-sst-2-english"
|
22 |
fine_tuned_model = pipeline("sentiment-analysis", model=fine_tuned_model_name)
|
23 |
|
|
|
25 |
raw_result = raw_model(input_text)
|
26 |
scademy_500_500_result = scademy_500_500_model(input_text)
|
27 |
scademy_2500_2500_result = scademy_2500_2500_model(input_text)
|
28 |
+
scademy_12500_12500_result = scademy_12500_12500_model(input_text)
|
29 |
fine_tuned_result = fine_tuned_model(input_text)
|
30 |
return (
|
31 |
format_model_output(raw_result[0]),
|
32 |
format_model_output(scademy_500_500_result[0]),
|
33 |
format_model_output(scademy_2500_2500_result[0]),
|
34 |
+
format_model_output(scademy_12500_12500_result[0]),
|
35 |
format_model_output(fine_tuned_result[0])
|
36 |
)
|
37 |
|
|
|
48 |
gr.Textbox(label="Base DistilBERT output (distilbert-base-uncased)"),
|
49 |
gr.Textbox(label="Scademy DistilBERT 500-500 output"),
|
50 |
gr.Textbox(label="Scademy DistilBERT 2500-2500 output"),
|
51 |
+
gr.Textbox(label="Scademy DistilBERT 12500-12500 output"),
|
52 |
gr.Textbox(label="Fine-tuned DistilBERT output"),
|
53 |
],
|
54 |
)
|