Spaces:
Runtime error
Runtime error
Add application file
Browse files
app.py
CHANGED
|
@@ -53,11 +53,9 @@ def classify_image(img):
|
|
| 53 |
pred,idx,probs = model.predict(img)
|
| 54 |
return {labels[i]: float(probs[i]) for i in range(len(labels))}
|
| 55 |
|
| 56 |
-
|
| 57 |
-
|
| 58 |
image = gr.inputs.Image(shape=(256, 256))
|
| 59 |
label = gr.outputs.Label()
|
| 60 |
-
examples = ['airplane_002.jpg','airplane_003.jpg','airport_020.jpg','airport_075.jpg','bridge_679.jpg','cloud_227.jpg','freeway_159.jpg','forest_235.jpg']
|
| 61 |
|
| 62 |
intf = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples=examples)
|
| 63 |
intf.launch(inline=False)
|
|
|
|
| 53 |
pred,idx,probs = model.predict(img)
|
| 54 |
return {labels[i]: float(probs[i]) for i in range(len(labels))}
|
| 55 |
|
|
|
|
|
|
|
| 56 |
image = gr.inputs.Image(shape=(256, 256))
|
| 57 |
label = gr.outputs.Label()
|
| 58 |
+
examples = ['images/airplane_002.jpg','images/airplane_003.jpg','images/airport_020.jpg','images/airport_075.jpg','images/bridge_679.jpg','images/cloud_227.jpg','images/freeway_159.jpg','images/forest_235.jpg']
|
| 59 |
|
| 60 |
intf = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples=examples)
|
| 61 |
intf.launch(inline=False)
|