Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -47,10 +47,9 @@ def get_figure(in_pil_img, in_results):
|
|
| 47 |
return plt.gcf()
|
| 48 |
|
| 49 |
|
| 50 |
-
def predict(
|
| 51 |
-
|
| 52 |
results = model(in_pil_img)
|
| 53 |
-
|
| 54 |
figure = get_figure(in_pil_img, results)
|
| 55 |
|
| 56 |
buf = io.BytesIO()
|
|
@@ -62,7 +61,7 @@ def predict(model, in_pil_img):
|
|
| 62 |
|
| 63 |
|
| 64 |
input = gr.inputs.Image(label="Upload your Image", type = 'pil', optional=True)
|
| 65 |
-
output = gr.
|
| 66 |
|
| 67 |
|
| 68 |
interface = gr.Interface(
|
|
|
|
| 47 |
return plt.gcf()
|
| 48 |
|
| 49 |
|
| 50 |
+
def predict(in_pil_img):
|
| 51 |
+
|
| 52 |
results = model(in_pil_img)
|
|
|
|
| 53 |
figure = get_figure(in_pil_img, results)
|
| 54 |
|
| 55 |
buf = io.BytesIO()
|
|
|
|
| 61 |
|
| 62 |
|
| 63 |
input = gr.inputs.Image(label="Upload your Image", type = 'pil', optional=True)
|
| 64 |
+
output = gr.Image(label="Output image with predicted instances", type="pil")
|
| 65 |
|
| 66 |
|
| 67 |
interface = gr.Interface(
|