akhaliq HF staff commited on
Commit
d3f60cb
1 Parent(s): 76a365b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
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/inception_and_googlenet/googlenet/model/googlenet-9.onnx")
43
 
44
- ort_session = ort.InferenceSession("googlenet-9.onnx")
45
 
46
 
47
  def predict(path):
@@ -59,8 +59,8 @@ def predict(path):
59
  return results
60
 
61
 
62
- title="GoogleNet"
63
- description="GoogLeNet is the name of a convolutional neural network for classification, which competed in the ImageNet Large Scale Visual Recognition Challenge in 2014."
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)