Spaces:
Sleeping
Sleeping
KajetanFrackowiak
commited on
Commit
•
679f419
1
Parent(s):
0a854cf
Upload app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ from typing import Tuple, Dict
|
|
9 |
|
10 |
# Setup class names
|
11 |
with open("class_names.txt", "r") as f:
|
12 |
-
class_names = [food_name.strip() for food_name in f.
|
13 |
|
14 |
effnetb2, effnetb2_transforms = create_effnetb2_model(
|
15 |
num_classes=101
|
@@ -50,7 +50,7 @@ demo = gr.Interface(
|
|
50 |
inputs=gr.Image(type="pil"),
|
51 |
outputs=[
|
52 |
gr.Label(num_top_classes=5, label="Predictions"),
|
53 |
-
gr.Number(label="
|
54 |
],
|
55 |
examples=example_list,
|
56 |
title=title,
|
|
|
9 |
|
10 |
# Setup class names
|
11 |
with open("class_names.txt", "r") as f:
|
12 |
+
class_names = [food_name.strip() for food_name in f.readlines()]
|
13 |
|
14 |
effnetb2, effnetb2_transforms = create_effnetb2_model(
|
15 |
num_classes=101
|
|
|
50 |
inputs=gr.Image(type="pil"),
|
51 |
outputs=[
|
52 |
gr.Label(num_top_classes=5, label="Predictions"),
|
53 |
+
gr.Number(label="Prediction time(s)"),
|
54 |
],
|
55 |
examples=example_list,
|
56 |
title=title,
|