Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -46,13 +46,11 @@ def get_prediction(model_id):
|
|
| 46 |
|
| 47 |
def predict(review):
|
| 48 |
prediction = classifier(review)
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
new_pred = print(p)
|
| 52 |
-
predictions.append(new_pred)
|
| 53 |
-
return predictions
|
| 54 |
return predict
|
| 55 |
|
|
|
|
| 56 |
with app:
|
| 57 |
gr.Markdown(
|
| 58 |
"""
|
|
@@ -101,8 +99,5 @@ with app:
|
|
| 101 |
out_3 = gr.Textbox(label="Prediction for Model 3")
|
| 102 |
classifier = pipeline("text-classification", model=model_id_3)
|
| 103 |
btn3.click(fn=get_prediction(model_id_2), inputs=inp_1, outputs=out_3)
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
app.launch()
|
|
|
|
| 46 |
|
| 47 |
def predict(review):
|
| 48 |
prediction = classifier(review)
|
| 49 |
+
print(prediction)
|
| 50 |
+
return prediction
|
|
|
|
|
|
|
|
|
|
| 51 |
return predict
|
| 52 |
|
| 53 |
+
|
| 54 |
with app:
|
| 55 |
gr.Markdown(
|
| 56 |
"""
|
|
|
|
| 99 |
out_3 = gr.Textbox(label="Prediction for Model 3")
|
| 100 |
classifier = pipeline("text-classification", model=model_id_3)
|
| 101 |
btn3.click(fn=get_prediction(model_id_2), inputs=inp_1, outputs=out_3)
|
| 102 |
+
|
|
|
|
|
|
|
|
|
|
| 103 |
app.launch()
|