Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,11 +1,9 @@
|
|
1 |
-
|
2 |
from os import O_ACCMODE
|
3 |
import gradio as gr
|
4 |
-
import joblib
|
5 |
from transformers import pipeline
|
6 |
-
import
|
7 |
-
from huggingface_hub import
|
8 |
-
from huggingface_hub.repocard import metadata_load
|
9 |
|
10 |
app = gr.Blocks()
|
11 |
|
@@ -77,11 +75,11 @@ with app:
|
|
77 |
btn5 = gr.Button("Predict - Model 5")
|
78 |
|
79 |
with gr.Column():
|
80 |
-
out_1 = gr.Textbox(label="Predictions for Model 1")
|
81 |
-
out_2 = gr.Textbox(label="Predictions for Model 2")
|
82 |
-
out_3 = gr.Textbox(label="Predictions for Model 3")
|
83 |
-
out_4 = gr.Textbox(label="Predictions for Model 4")
|
84 |
-
out_5 = gr.Textbox(label="Predictions for Model 5")
|
85 |
|
86 |
btn1.click(fn=get_prediction(model_id_1), inputs=inp_1, outputs=out_1)
|
87 |
btn2.click(fn=get_prediction(model_id_2), inputs=inp_1, outputs=out_2)
|
|
|
1 |
+
|
2 |
from os import O_ACCMODE
|
3 |
import gradio as gr
|
|
|
4 |
from transformers import pipeline
|
5 |
+
# from huggingface_hub import HfApi, hf_hub_download
|
6 |
+
# from huggingface_hub.repocard import metadata_load
|
|
|
7 |
|
8 |
app = gr.Blocks()
|
9 |
|
|
|
75 |
btn5 = gr.Button("Predict - Model 5")
|
76 |
|
77 |
with gr.Column():
|
78 |
+
out_1 = gr.Textbox(label="Predictions for Model 1", lines=5)
|
79 |
+
out_2 = gr.Textbox(label="Predictions for Model 2", lines=5)
|
80 |
+
out_3 = gr.Textbox(label="Predictions for Model 3", lines=5)
|
81 |
+
out_4 = gr.Textbox(label="Predictions for Model 4", lines=5)
|
82 |
+
out_5 = gr.Textbox(label="Predictions for Model 5", lines=5)
|
83 |
|
84 |
btn1.click(fn=get_prediction(model_id_1), inputs=inp_1, outputs=out_1)
|
85 |
btn2.click(fn=get_prediction(model_id_2), inputs=inp_1, outputs=out_2)
|