Update app.py
Browse files
app.py
CHANGED
@@ -39,9 +39,9 @@ mx.test_utils.download('https://s3.amazonaws.com/onnx-model-zoo/synset.txt')
|
|
39 |
with open('synset.txt', 'r') as f:
|
40 |
labels = [l.rstrip() for l in f]
|
41 |
|
42 |
-
os.system("wget https://github.com/onnx/models/raw/main/vision/classification/
|
43 |
|
44 |
-
ort_session = ort.InferenceSession("
|
45 |
|
46 |
|
47 |
def predict(path):
|
@@ -59,8 +59,8 @@ def predict(path):
|
|
59 |
return results
|
60 |
|
61 |
|
62 |
-
title="
|
63 |
-
description="
|
64 |
|
65 |
examples=[['catonnx.jpg']]
|
66 |
gr.Interface(predict,gr.inputs.Image(type='filepath'),"label",title=title,description=description,examples=examples).launch(enable_queue=True,debug=True)
|
|
|
39 |
with open('synset.txt', 'r') as f:
|
40 |
labels = [l.rstrip() for l in f]
|
41 |
|
42 |
+
os.system("wget https://github.com/onnx/models/raw/main/vision/classification/zfnet-512/model/zfnet512-12.onnx")
|
43 |
|
44 |
+
ort_session = ort.InferenceSession("zfnet512-12.onnx")
|
45 |
|
46 |
|
47 |
def predict(path):
|
|
|
59 |
return results
|
60 |
|
61 |
|
62 |
+
title="ZFNet-512"
|
63 |
+
description="ZFNet-512 is a deep convolutional networks for classification. This model's 4th layer has 512 maps instead of 1024 maps mentioned in the paper."
|
64 |
|
65 |
examples=[['catonnx.jpg']]
|
66 |
gr.Interface(predict,gr.inputs.Image(type='filepath'),"label",title=title,description=description,examples=examples).launch(enable_queue=True,debug=True)
|