Update app.py
Browse files
app.py
CHANGED
@@ -56,10 +56,11 @@ def inference(img):
|
|
56 |
ax.text(x, y, "{} {:.0f}%".format(classes_to_labels[classes[idx] - 1], confidences[idx]*100), bbox=dict(facecolor='white', alpha=0.5))
|
57 |
plt.axis('off')
|
58 |
plt.draw()
|
59 |
-
|
|
|
60 |
|
61 |
inputs = gr.inputs.Image(type='file', label="Original Image")
|
62 |
-
outputs = gr.outputs.Image(type="
|
63 |
|
64 |
title = "Single Shot MultiBox Detector model for object detection"
|
65 |
description = "Gradio demo for Single Shot MultiBox Detector model for object detection by Nvidia. To use it upload an image or click an example images images. Read more at the links below"
|
|
|
56 |
ax.text(x, y, "{} {:.0f}%".format(classes_to_labels[classes[idx] - 1], confidences[idx]*100), bbox=dict(facecolor='white', alpha=0.5))
|
57 |
plt.axis('off')
|
58 |
plt.draw()
|
59 |
+
plt.savefig("test.png",bbox_inches='tight')
|
60 |
+
return "test.png"
|
61 |
|
62 |
inputs = gr.inputs.Image(type='file', label="Original Image")
|
63 |
+
outputs = gr.outputs.Image(type="file", label="Output Image")
|
64 |
|
65 |
title = "Single Shot MultiBox Detector model for object detection"
|
66 |
description = "Gradio demo for Single Shot MultiBox Detector model for object detection by Nvidia. To use it upload an image or click an example images images. Read more at the links below"
|