CK42 commited on
Commit
d68a14d
1 Parent(s): e9f4a02

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +34 -8
app.py CHANGED
@@ -12,7 +12,10 @@ app = gr.Blocks()
12
 
13
  model_id_1 = "nlptown/bert-base-multilingual-uncased-sentiment"
14
  model_id_2 = "microsoft/deberta-base"
15
- model_id_3 = "juliensimon/distilbert-amazon-shoe-reviews"
 
 
 
16
 
17
  def load_agent(model_id):
18
  """
@@ -72,9 +75,9 @@ with app:
72
  """)
73
 
74
  with gr.Row():
75
- btn1 = gr.Button("Predict for Model 1")
76
  with gr.Row():
77
- out_1 = gr.Textbox(label="Prediction for Model 1")
78
  btn1.click(fn=get_prediction(model_id_1), inputs=inp_1, outputs=out_1)
79
 
80
  gr.Markdown(
@@ -83,20 +86,43 @@ with app:
83
  """)
84
 
85
  with gr.Row():
86
- btn2 = gr.Button("Predict for Model 2")
87
  with gr.Row():
88
- out_2 = gr.Textbox(label="Prediction for Model 2")
89
  btn2.click(fn=get_prediction(model_id_2), inputs=inp_1, outputs=out_2)
90
 
91
  gr.Markdown(
92
  """
93
- Model 3 = juliensimon/distilbert-amazon-shoe-reviews
94
  """)
95
 
96
  with gr.Row():
97
- btn3 = gr.Button("Predict for Model 3")
98
  with gr.Row():
99
- out_3 = gr.Textbox(label="Prediction for Model 3")
100
  btn3.click(fn=get_prediction(model_id_3), inputs=inp_1, outputs=out_3)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
101
 
102
  app.launch()
 
12
 
13
  model_id_1 = "nlptown/bert-base-multilingual-uncased-sentiment"
14
  model_id_2 = "microsoft/deberta-base"
15
+ model_id_3 = "distilbert-base-uncased-finetuned-sst-2-english"
16
+ model_id_4 = "lordtt13/emo-mobilebert"
17
+ model_id_5 = "juliensimon/reviews-sentiment-analysis"
18
+
19
 
20
  def load_agent(model_id):
21
  """
 
75
  """)
76
 
77
  with gr.Row():
78
+ btn1 = gr.Button("Predict - Model 1")
79
  with gr.Row():
80
+ out_1 = gr.Textbox(label="Predictions for Model 1")
81
  btn1.click(fn=get_prediction(model_id_1), inputs=inp_1, outputs=out_1)
82
 
83
  gr.Markdown(
 
86
  """)
87
 
88
  with gr.Row():
89
+ btn2 = gr.Button("Predict - Model 2")
90
  with gr.Row():
91
+ out_2 = gr.Textbox(label="Predictions for Model 2")
92
  btn2.click(fn=get_prediction(model_id_2), inputs=inp_1, outputs=out_2)
93
 
94
  gr.Markdown(
95
  """
96
+ Model 3 = distilbert-base-uncased-finetuned-sst-2-english"
97
  """)
98
 
99
  with gr.Row():
100
+ btn3 = gr.Button("Predict - Model 3")
101
  with gr.Row():
102
+ out_3 = gr.Textbox(label="Predictions for Model 3")
103
  btn3.click(fn=get_prediction(model_id_3), inputs=inp_1, outputs=out_3)
104
+
105
+ gr.Markdown(
106
+ """
107
+ Model 4 = lordtt13/emo-mobilebert
108
+ """)
109
+
110
+ with gr.Row():
111
+ btn4 = gr.Button("Predict - Model 4")
112
+ with gr.Row():
113
+ out_4 = gr.Textbox(label="Predictions for Model 4")
114
+ btn3.click(fn=get_prediction(model_id_4), inputs=inp_1, outputs=out_4)
115
+
116
+ gr.Markdown(
117
+ """
118
+ Model 5 = juliensimon/reviews-sentiment-analysis
119
+ """)
120
+
121
+ with gr.Row():
122
+ btn5 = gr.Button("Predict - Model 5")
123
+ with gr.Row():
124
+ out_5 = gr.Textbox(label="Predictions for Model 5")
125
+ btn5.click(fn=get_prediction(model_id_4), inputs=inp_1, outputs=out_4)
126
+
127
 
128
  app.launch()