Spaces:
Runtime error
Runtime error
fix typos
Browse files
app.py
CHANGED
@@ -47,17 +47,17 @@ def predict(img: Image) -> Tuple[dict, float]:
|
|
47 |
title = "FoodVision Mini"
|
48 |
description = "EfficientNetB2 feature extractor to classify images of food as pizza, steak, or sushi."
|
49 |
article = "From the [Zero to Mastery PyTorch tutorial](https://www.learnpytorch.io/09_pytorch_model_deployment/)"
|
50 |
-
examples = [
|
51 |
|
52 |
demo = gr.Interface(
|
53 |
fn=predict,
|
54 |
inputs=gr.Image(type="pil"),
|
55 |
outputs=[gr.Label(num_top_classes=3, label="Predictions"),
|
56 |
gr.Number(label="Prediction time (s)")],
|
57 |
-
examples=
|
58 |
title=title,
|
59 |
description=description,
|
60 |
article=article,
|
61 |
)
|
62 |
|
63 |
-
demo.
|
|
|
47 |
title = "FoodVision Mini"
|
48 |
description = "EfficientNetB2 feature extractor to classify images of food as pizza, steak, or sushi."
|
49 |
article = "From the [Zero to Mastery PyTorch tutorial](https://www.learnpytorch.io/09_pytorch_model_deployment/)"
|
50 |
+
examples = [[example] for example in Path("examples").glob("*.jpg")]
|
51 |
|
52 |
demo = gr.Interface(
|
53 |
fn=predict,
|
54 |
inputs=gr.Image(type="pil"),
|
55 |
outputs=[gr.Label(num_top_classes=3, label="Predictions"),
|
56 |
gr.Number(label="Prediction time (s)")],
|
57 |
+
examples=examples,
|
58 |
title=title,
|
59 |
description=description,
|
60 |
article=article,
|
61 |
)
|
62 |
|
63 |
+
demo.launch()
|