Spaces:
Sleeping
Sleeping
Mehmet Batuhan Duman
commited on
Commit
·
4ec8736
1
Parent(s):
0a2fbf3
Changed scan func
Browse files
app.py
CHANGED
@@ -243,13 +243,11 @@ def gradio_process_image(input_image_path, model, threshold=0.5):
|
|
243 |
output_image_path = scanmap(input_image_path, model, threshold)
|
244 |
elapsed_time = time.time() - start_time
|
245 |
|
246 |
-
|
247 |
-
|
248 |
-
return output_image, f"Elapsed Time (seconds): {elapsed_time}"
|
249 |
|
250 |
inputs = gr.inputs.Image(label="Upload Image")
|
251 |
outputs = [
|
252 |
-
gr.outputs.Image(label="Detected Ships"),
|
253 |
gr.outputs.Textbox(label="Elapsed Time")
|
254 |
]
|
255 |
|
@@ -257,5 +255,4 @@ outputs = [
|
|
257 |
gradio_process_image_partial = partial(gradio_process_image, model=model, threshold=0.5)
|
258 |
|
259 |
iface = gr.Interface(fn=gradio_process_image_partial, inputs=inputs, outputs=outputs)
|
260 |
-
iface.launch()
|
261 |
-
|
|
|
243 |
output_image_path = scanmap(input_image_path, model, threshold)
|
244 |
elapsed_time = time.time() - start_time
|
245 |
|
246 |
+
return output_image_path, f"Elapsed Time (seconds): {elapsed_time}"
|
|
|
|
|
247 |
|
248 |
inputs = gr.inputs.Image(label="Upload Image")
|
249 |
outputs = [
|
250 |
+
gr.outputs.Image(type='filepath', label="Detected Ships"),
|
251 |
gr.outputs.Textbox(label="Elapsed Time")
|
252 |
]
|
253 |
|
|
|
255 |
gradio_process_image_partial = partial(gradio_process_image, model=model, threshold=0.5)
|
256 |
|
257 |
iface = gr.Interface(fn=gradio_process_image_partial, inputs=inputs, outputs=outputs)
|
258 |
+
iface.launch()
|
|