Spaces:
Running
on
Zero
Running
on
Zero
remove self call
Browse files
app.py
CHANGED
@@ -34,7 +34,6 @@ def fig_to_pil(fig):
|
|
34 |
|
35 |
@spaces.GPU
|
36 |
def run_example(task_prompt, image, text_input=None):
|
37 |
-
model = model
|
38 |
processor = processor
|
39 |
if text_input is None:
|
40 |
prompt = task_prompt
|
@@ -111,7 +110,7 @@ def draw_ocr_bboxes(image, prediction):
|
|
111 |
fill=color)
|
112 |
return image
|
113 |
|
114 |
-
def process_image(image, task_prompt, text_input=None
|
115 |
image = Image.fromarray(image) # Convert NumPy array to PIL Image
|
116 |
if task_prompt == 'Document Visual Question Answering':
|
117 |
task_prompt = '<DocVQA>'
|
|
|
34 |
|
35 |
@spaces.GPU
|
36 |
def run_example(task_prompt, image, text_input=None):
|
|
|
37 |
processor = processor
|
38 |
if text_input is None:
|
39 |
prompt = task_prompt
|
|
|
110 |
fill=color)
|
111 |
return image
|
112 |
|
113 |
+
def process_image(image, task_prompt, text_input=None):
|
114 |
image = Image.fromarray(image) # Convert NumPy array to PIL Image
|
115 |
if task_prompt == 'Document Visual Question Answering':
|
116 |
task_prompt = '<DocVQA>'
|