klyap commited on
Commit
2d3cc77
1 Parent(s): 30faa8c

add img examples

Browse files
Files changed (5) hide show
  1. .gitattributes +2 -0
  2. aesthetic-pancakes.jpg +3 -0
  3. app.py +3 -1
  4. messy-oatmeal.png +3 -0
  5. messy-plating.png +3 -0
.gitattributes CHANGED
@@ -32,3 +32,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
32
  *.zip filter=lfs diff=lfs merge=lfs -text
33
  *.zst filter=lfs diff=lfs merge=lfs -text
34
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
32
  *.zip filter=lfs diff=lfs merge=lfs -text
33
  *.zst filter=lfs diff=lfs merge=lfs -text
34
  *tfevents* filter=lfs diff=lfs merge=lfs -text
35
+ *.jpg filter=lfs diff=lfs merge=lfs -text
36
+ *.png filter=lfs diff=lfs merge=lfs -text
aesthetic-pancakes.jpg ADDED

Git LFS Details

  • SHA256: 2e0e25c7fd65e4af1e00e8e781a1989e21f25f48c1892d8ce3d13856cbb10462
  • Pointer size: 132 Bytes
  • Size of remote file: 2.02 MB
app.py CHANGED
@@ -15,4 +15,6 @@ def predict(img):
15
  pred,pred_idx,probs = learn.predict(img)
16
  return {labels[i]: float(probs[i]) for i in range(len(labels))}
17
 
18
- gr.Interface(fn=predict, inputs=gr.Image(shape=(512, 512)), outputs=gr.Label(num_top_classes=3)).launch(share=False)
 
 
 
15
  pred,pred_idx,probs = learn.predict(img)
16
  return {labels[i]: float(probs[i]) for i in range(len(labels))}
17
 
18
+ examples = ['aesthetic-pancakes.jpg', 'messy-oatmeal.png', 'messy-plating.png']
19
+
20
+ gr.Interface(fn=predict, inputs=gr.Image(shape=(512, 512)), outputs=gr.Label(num_top_classes=3), examples=examples).launch(share=False)
messy-oatmeal.png ADDED

Git LFS Details

  • SHA256: ad7e6dde0644b9d38b6382ad214a29b6afef5bfca56da7e767dee1f5ca2634de
  • Pointer size: 132 Bytes
  • Size of remote file: 2.31 MB
messy-plating.png ADDED

Git LFS Details

  • SHA256: 2f1062a0dfa433f187ec11248ae633a15cd85c91edebe870781917a097f152d5
  • Pointer size: 132 Bytes
  • Size of remote file: 2.48 MB