Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -120,7 +120,7 @@ def process_image(image, task_prompt, text_input=None, model_id='dwb2023/florenc
|
|
| 120 |
if task_prompt == 'Object Detection':
|
| 121 |
task_prompt = '<OD>'
|
| 122 |
parsed_od, generated_od = run_example(task_prompt, image, model_id=model_id)
|
| 123 |
-
fig = plot_bbox(image,
|
| 124 |
return parsed_od, generated_od, fig_to_pil(fig)
|
| 125 |
else:
|
| 126 |
return "", None # Return empty string and None for unknown task prompts
|
|
|
|
| 120 |
if task_prompt == 'Object Detection':
|
| 121 |
task_prompt = '<OD>'
|
| 122 |
parsed_od, generated_od = run_example(task_prompt, image, model_id=model_id)
|
| 123 |
+
fig = plot_bbox(image, parsed_od['<OD>'])
|
| 124 |
return parsed_od, generated_od, fig_to_pil(fig)
|
| 125 |
else:
|
| 126 |
return "", None # Return empty string and None for unknown task prompts
|