Update app.py
Browse files
app.py
CHANGED
|
@@ -120,7 +120,7 @@ def draw_ocr_bboxes(image, prediction):
|
|
| 120 |
def process_image(image, task_prompt, text_input=None, model_id='J-LAB/Florence_2_B_FluxiAI_Product_Caption'):
|
| 121 |
image = Image.fromarray(image) # Convert NumPy array to PIL Image
|
| 122 |
if task_prompt == 'Product Caption':
|
| 123 |
-
task_prompt = '<
|
| 124 |
results = run_example(task_prompt, image, model_id=model_id)
|
| 125 |
return results, None
|
| 126 |
elif task_prompt == 'More Detailed Caption':
|
|
@@ -140,7 +140,7 @@ css = """
|
|
| 140 |
|
| 141 |
|
| 142 |
single_task_list =[
|
| 143 |
-
'
|
| 144 |
]
|
| 145 |
|
| 146 |
|
|
|
|
| 120 |
def process_image(image, task_prompt, text_input=None, model_id='J-LAB/Florence_2_B_FluxiAI_Product_Caption'):
|
| 121 |
image = Image.fromarray(image) # Convert NumPy array to PIL Image
|
| 122 |
if task_prompt == 'Product Caption':
|
| 123 |
+
task_prompt = '<PC>'
|
| 124 |
results = run_example(task_prompt, image, model_id=model_id)
|
| 125 |
return results, None
|
| 126 |
elif task_prompt == 'More Detailed Caption':
|
|
|
|
| 140 |
|
| 141 |
|
| 142 |
single_task_list =[
|
| 143 |
+
'Product Caption', 'More Detailed Caption'
|
| 144 |
]
|
| 145 |
|
| 146 |
|