devdata commited on
Commit
13160f3
·
1 Parent(s): bb5c9ff

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -7,6 +7,7 @@ learn = load_learner('export.pkl')
7
 
8
  labels = learn.dls.vocab
9
 
 
10
  def predict(img):
11
  img = PILImage.create(img)
12
  img = img.resize((512, 512))
@@ -14,7 +15,6 @@ def predict(img):
14
  return {labels[i]: float(probs[i]) for i in range(len(labels))}
15
 
16
  examples = ['image1.jpg', 'image2.jpg']
17
- enable_queue=True
18
 
19
- gr.Interface(fn=predict, inputs=gr.components.Image(), outputs=gr.components.Label(num_top_classes=3), examples=examples, enable_queue=enable_queue).launch()
20
 
 
7
 
8
  labels = learn.dls.vocab
9
 
10
+
11
  def predict(img):
12
  img = PILImage.create(img)
13
  img = img.resize((512, 512))
 
15
  return {labels[i]: float(probs[i]) for i in range(len(labels))}
16
 
17
  examples = ['image1.jpg', 'image2.jpg']
 
18
 
19
+ gr.Interface(fn=predict, inputs=gr.components.Image(), outputs=gr.components.Label(num_top_classes=3), examples=examples).launch()
20