use local kinetics_classnames.json
Browse files
app.py
CHANGED
@@ -22,10 +22,10 @@ import gradio as gr
|
|
22 |
device = "cpu"
|
23 |
model = model.eval()
|
24 |
model = model.to(device)
|
25 |
-
json_url = "https://dl.fbaipublicfiles.com/pyslowfast/dataset/class_names/kinetics_classnames.json"
|
26 |
-
json_filename = "kinetics_classnames.json"
|
27 |
-
try: urllib.URLopener().retrieve(json_url, json_filename)
|
28 |
-
except: urllib.request.urlretrieve(json_url, json_filename)
|
29 |
with open(json_filename, "r") as f:
|
30 |
kinetics_classnames = json.load(f)
|
31 |
|
|
|
22 |
device = "cpu"
|
23 |
model = model.eval()
|
24 |
model = model.to(device)
|
25 |
+
# json_url = "https://dl.fbaipublicfiles.com/pyslowfast/dataset/class_names/kinetics_classnames.json"
|
26 |
+
json_filename = "./kinetics_classnames.json"
|
27 |
+
# try: urllib.URLopener().retrieve(json_url, json_filename)
|
28 |
+
# except: urllib.request.urlretrieve(json_url, json_filename)
|
29 |
with open(json_filename, "r") as f:
|
30 |
kinetics_classnames = json.load(f)
|
31 |
|