Spaces:
Runtime error
Runtime error
pass text
Browse files
app.py
CHANGED
@@ -113,8 +113,8 @@ def process_image(image, task_prompt, text_input=None):
|
|
113 |
image = Image.fromarray(image) # Convert NumPy array to PIL Image
|
114 |
if task_prompt == 'Document Visual Question Answering':
|
115 |
task_prompt = '<DocVQA>'
|
116 |
-
results = run_example(task_prompt, image)
|
117 |
-
return results, None
|
118 |
elif task_prompt == 'Caption':
|
119 |
task_prompt = '<CAPTION>'
|
120 |
results = run_example(task_prompt, image)
|
|
|
113 |
image = Image.fromarray(image) # Convert NumPy array to PIL Image
|
114 |
if task_prompt == 'Document Visual Question Answering':
|
115 |
task_prompt = '<DocVQA>'
|
116 |
+
results = run_example(task_prompt, image, text_input)
|
117 |
+
return results[task_prompt], None
|
118 |
elif task_prompt == 'Caption':
|
119 |
task_prompt = '<CAPTION>'
|
120 |
results = run_example(task_prompt, image)
|