Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -60,25 +60,29 @@ with app:
|
|
| 60 |
""")
|
| 61 |
with gr.Row():
|
| 62 |
inp_1= gr.Textbox(label="Type text here.",placeholder="The customer service was satisfactory.")
|
| 63 |
-
out_2 = gr.Textbox(label="Prediction")
|
| 64 |
|
| 65 |
gr.Markdown(
|
| 66 |
"""
|
| 67 |
Model Predictions
|
| 68 |
""")
|
| 69 |
|
|
|
|
|
|
|
| 70 |
with gr.Row():
|
| 71 |
-
|
| 72 |
with gr.Row():
|
| 73 |
-
|
|
|
|
| 74 |
classifier = pipeline("text-classification", model=model_id_1)
|
| 75 |
-
|
| 76 |
|
|
|
|
|
|
|
| 77 |
with gr.Row():
|
| 78 |
-
|
| 79 |
with gr.Row():
|
| 80 |
-
|
| 81 |
classifier = pipeline("text-classification", model=model_id_2)
|
| 82 |
-
|
| 83 |
|
| 84 |
app.launch()
|
|
|
|
| 60 |
""")
|
| 61 |
with gr.Row():
|
| 62 |
inp_1= gr.Textbox(label="Type text here.",placeholder="The customer service was satisfactory.")
|
|
|
|
| 63 |
|
| 64 |
gr.Markdown(
|
| 65 |
"""
|
| 66 |
Model Predictions
|
| 67 |
""")
|
| 68 |
|
| 69 |
+
# with gr.Row():
|
| 70 |
+
# model1_input = gr.Textbox(label="Model 1")
|
| 71 |
with gr.Row():
|
| 72 |
+
btn1 = gr.Button("Prediction for Model 1")
|
| 73 |
with gr.Row():
|
| 74 |
+
out_1 = gr.Textbox(label="Prediction")
|
| 75 |
+
|
| 76 |
classifier = pipeline("text-classification", model=model_id_1)
|
| 77 |
+
btn1.click(fn=predict, inputs=inp_1, outputs=out_1)
|
| 78 |
|
| 79 |
+
# with gr.Row():
|
| 80 |
+
# model2_input = gr.Textbox(label="Model 2")
|
| 81 |
with gr.Row():
|
| 82 |
+
btn2 = gr.Button("Prediction for Model 2")
|
| 83 |
with gr.Row():
|
| 84 |
+
out_2 = gr.Textbox(label="Prediction")
|
| 85 |
classifier = pipeline("text-classification", model=model_id_2)
|
| 86 |
+
btn2.click(fn=predict, inputs=inp_1, outputs=out_2)
|
| 87 |
|
| 88 |
app.launch()
|