CK42 commited on
Commit
d3aaf9a
1 Parent(s): 326066b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -7
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
- model1_input = gr.Textbox(label="Model 1")
72
  with gr.Row():
73
- btn = gr.Button("Prediction for Model 1")
 
74
  classifier = pipeline("text-classification", model=model_id_1)
75
- btn.click(fn=predict, inputs=inp_1, outputs=out_2)
76
 
 
 
77
  with gr.Row():
78
- model2_input = gr.Textbox(label="Model 2")
79
  with gr.Row():
80
- btn = gr.Button("Prediction for Model 2")
81
  classifier = pipeline("text-classification", model=model_id_2)
82
- btn.click(fn=predict, inputs=inp_1, outputs=out_2)
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()