hlydecker commited on
Commit
ce15296
·
verified ·
1 Parent(s): c0b45ca

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -34,5 +34,7 @@ def predict(image):
34
  label = model.config.id2label[predicted_class_idx].split(",")[0]
35
  time.sleep(2)
36
  return {label: float(predicted_class_prob)}
37
-
38
- gr.Interface(predict, gr.Image(type="pil"), "label").launch()
 
 
 
34
  label = model.config.id2label[predicted_class_idx].split(",")[0]
35
  time.sleep(2)
36
  return {label: float(predicted_class_prob)}
37
+
38
+
39
+ examples = [['data/closed_highrise.jpg'], ['data/open_lowrise.jpg'],['data/dense_trees.jpg'],['data/large_lowrise.jpg']]
40
+ gr.Interface(predict, gr.Image(type="pil"), "label", examples=examples).launch()