mirror of
https://github.com/gradio-app/gradio.git
synced 2024-11-27 01:40:20 +08:00
add imagenet labels for demo
This commit is contained in:
parent
37a552c9c1
commit
9f9991d058
1000
demo/files/imagenet_labels.json
Normal file
1000
demo/files/imagenet_labels.json
Normal file
File diff suppressed because it is too large
Load Diff
@ -7,10 +7,11 @@ import numpy as np
|
||||
from PIL import Image
|
||||
import requests
|
||||
from urllib.request import urlretrieve
|
||||
import json
|
||||
|
||||
# # Download human-readable labels for ImageNet.
|
||||
response = requests.get("https://git.io/JJkYN")
|
||||
labels = response.text.split("\n")
|
||||
# Load human-readable labels for ImageNet.
|
||||
with open("files/imagenet_labels.json") as labels_file:
|
||||
labels = json.load(labels_file)
|
||||
|
||||
mobile_net = tf.keras.applications.MobileNetV2()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user