Spaces:
Runtime error
Runtime error
Commit
·
faedadd
1
Parent(s):
814fb94
Update app.py
Browse files
app.py
CHANGED
@@ -13,7 +13,7 @@ def get_imagenet_labels(filename):
|
|
13 |
labels = []
|
14 |
with open(filename, 'r') as f:
|
15 |
for line in f:
|
16 |
-
labels.append(line.split('
|
17 |
return labels
|
18 |
|
19 |
classes = get_imagenet_labels("imagenet1k_labels.txt")
|
@@ -36,7 +36,7 @@ iface = gr.Interface(fn=classify,
|
|
36 |
title=title,
|
37 |
description=description,
|
38 |
enable_queue=True,
|
39 |
-
examples=[['panda.jpeg'], ["llamas.jpeg"], ["
|
40 |
article=article)
|
41 |
|
42 |
iface.launch()
|
|
|
13 |
labels = []
|
14 |
with open(filename, 'r') as f:
|
15 |
for line in f:
|
16 |
+
labels.append(line.split(' ')[1][:-1]) # split and remove line break.
|
17 |
return labels
|
18 |
|
19 |
classes = get_imagenet_labels("imagenet1k_labels.txt")
|
|
|
36 |
title=title,
|
37 |
description=description,
|
38 |
enable_queue=True,
|
39 |
+
examples=[['panda.jpeg'], ["llamas.jpeg"], ["hot_dog.png"]],
|
40 |
article=article)
|
41 |
|
42 |
iface.launch()
|