Spaces:
Running on Zero
Running on Zero
Fixes to UI
Browse files
app.py
CHANGED
|
@@ -27,6 +27,7 @@ model = Predictor(n_labels=len(LABELS))
|
|
| 27 |
|
| 28 |
model_file = hf_hub_download(
|
| 29 |
repo_id="Hali5/Mae-Model-MedMNIST-Predictor",
|
|
|
|
| 30 |
filename="checkpoints/model_linear_v2_epoch_100.pt"
|
| 31 |
)
|
| 32 |
|
|
@@ -88,7 +89,6 @@ with gradio.Blocks() as demo:
|
|
| 88 |
with gradio.Tab("Examples"):
|
| 89 |
gradio.Markdown("Click an example below to test the model against the PathMNIST test dataset.")
|
| 90 |
|
| 91 |
-
# Create a read-only text box to display the column for Truth Labels
|
| 92 |
with gradio.Column():
|
| 93 |
input_img_ex = gradio.Image(label="Selected Test Image")
|
| 94 |
truth_box = gradio.Textbox(label="Ground Truth Label", interactive=False)
|
|
@@ -97,8 +97,8 @@ with gradio.Blocks() as demo:
|
|
| 97 |
output_lbl_ex = gradio.Label(num_top_classes=3, label="Model Prediction")
|
| 98 |
|
| 99 |
gradio.Examples(
|
| 100 |
-
examples=example_rows,
|
| 101 |
-
inputs=[input_img_ex, truth_box],
|
| 102 |
outputs=output_lbl_ex,
|
| 103 |
fn=predict,
|
| 104 |
cache_examples=True,
|
|
|
|
| 27 |
|
| 28 |
model_file = hf_hub_download(
|
| 29 |
repo_id="Hali5/Mae-Model-MedMNIST-Predictor",
|
| 30 |
+
# Create a read-only text box to display the column for Truth Labels
|
| 31 |
filename="checkpoints/model_linear_v2_epoch_100.pt"
|
| 32 |
)
|
| 33 |
|
|
|
|
| 89 |
with gradio.Tab("Examples"):
|
| 90 |
gradio.Markdown("Click an example below to test the model against the PathMNIST test dataset.")
|
| 91 |
|
|
|
|
| 92 |
with gradio.Column():
|
| 93 |
input_img_ex = gradio.Image(label="Selected Test Image")
|
| 94 |
truth_box = gradio.Textbox(label="Ground Truth Label", interactive=False)
|
|
|
|
| 97 |
output_lbl_ex = gradio.Label(num_top_classes=3, label="Model Prediction")
|
| 98 |
|
| 99 |
gradio.Examples(
|
| 100 |
+
examples=example_rows,
|
| 101 |
+
inputs=[input_img_ex, truth_box],
|
| 102 |
outputs=output_lbl_ex,
|
| 103 |
fn=predict,
|
| 104 |
cache_examples=True,
|