Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -15,22 +15,15 @@ def object_detection(im, size=640):
|
|
| 15 |
results.render() # updates results.imgs with boxes and labels
|
| 16 |
return Image.fromarray(results.imgs[0])
|
| 17 |
|
| 18 |
-
|
| 19 |
-
description = """Esse modelo é uma pequena demonstração baseada em uma análise de cerca de 60 imagens somente. Para resultados mais confiáveis e genéricos, são necessários mais exemplos (imagens).
|
| 20 |
-
"""
|
| 21 |
-
|
| 22 |
image = gr.inputs.Image(shape=(640, 640), image_mode="RGB", source="upload", label="Imagem", optional=False)
|
| 23 |
outputs = gr.outputs.Image(type="pil", label="Output Image")
|
| 24 |
|
| 25 |
-
#gr.Interface(detect,[gr.Image(type="pil"), gr.Image(type="pil")],description="demo for <a href='https://github.com/WongKinYiu/yolov7' style='text-decoration: underline' target='_blank'>WongKinYiu/yolov7</a> Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors").launch()
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
|
| 30 |
gr.Interface(
|
| 31 |
fn=object_detection,
|
| 32 |
inputs=image,
|
| 33 |
outputs=outputs,
|
| 34 |
title="Visual Pollution Detection",
|
| 35 |
-
description="Demo for <a href='https://github.com/LailaMB/Smartathon_Visual_Pollution_Detection' style='text-decoration: underline' target='_blank'>Smartathon Visual Pollution Detection Model</a>. The model which was developed by AICAS_KSU team to solve the Theme1 problem of the [Smartathon](https://smartathon.hackerearth.com).,
|
| 36 |
examples=[],cache_examples=False).launch()
|
|
|
|
| 15 |
results.render() # updates results.imgs with boxes and labels
|
| 16 |
return Image.fromarray(results.imgs[0])
|
| 17 |
|
| 18 |
+
|
|
|
|
|
|
|
|
|
|
| 19 |
image = gr.inputs.Image(shape=(640, 640), image_mode="RGB", source="upload", label="Imagem", optional=False)
|
| 20 |
outputs = gr.outputs.Image(type="pil", label="Output Image")
|
| 21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
gr.Interface(
|
| 24 |
fn=object_detection,
|
| 25 |
inputs=image,
|
| 26 |
outputs=outputs,
|
| 27 |
title="Visual Pollution Detection",
|
| 28 |
+
description="Demo for <a href='https://github.com/LailaMB/Smartathon_Visual_Pollution_Detection' style='text-decoration: underline' target='_blank'>Smartathon Visual Pollution Detection Model</a>. The model which was developed by AICAS_KSU team to solve the Theme1 problem of the [Smartathon](https://smartathon.hackerearth.com).',
|
| 29 |
examples=[],cache_examples=False).launch()
|