NKASG commited on
Commit
eac7741
·
verified ·
1 Parent(s): 69c02c7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -5
app.py CHANGED
@@ -59,10 +59,18 @@ def classify_image(img):
59
  pred, idx, probs = learn.predict(img)
60
  return dict(zip(categories, map(float, probs)))
61
 
62
- image = gr.Image(shape=(512, 512))
63
- label = gr.Label()
64
- examples = ['dress.jpg', 'shirt.jpg', 'pants.jpg', 'shorts.jpg']
65
 
66
- intf = gr.Interface(fn=classify_image, title=title, inputs=image, outputs=label, examples=examples)
67
- intf.launch(inline=False)
 
 
 
 
 
 
 
 
 
 
 
68
 
 
59
  pred, idx, probs = learn.predict(img)
60
  return dict(zip(categories, map(float, probs)))
61
 
 
 
 
62
 
63
+ iface = gr.Interface(
64
+ fn=classify_image,
65
+ inputs=gr.Image(),
66
+ outputs=gr.Textbox(),
67
+ # live=True,
68
+ )
69
+ iface.launch(share=True)
70
+ # image = gr.Image(shape=(512, 512))
71
+ # label = gr.Label()
72
+ # examples = ['dress.jpg', 'shirt.jpg', 'pants.jpg', 'shorts.jpg']
73
+
74
+ # intf = gr.Interface(fn=classify_image, title=title, inputs=image, outputs=label, examples=examples)
75
+ # intf.launch(inline=False)
76