Malay Shah commited on
Commit
4b765d9
1 Parent(s): 4e25ce8

Fixed another bug in app.py

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