Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -12,8 +12,7 @@ import numpy as np
|
|
12 |
import hashlib
|
13 |
import spaces # Make sure to import spaces
|
14 |
|
15 |
-
|
16 |
-
@spaces.GPU
|
17 |
|
18 |
#First output the thinking process in <think> </think> tags and then output the final answer in <answer> </answer> tags.
|
19 |
#Answer the following question based on the information above and the given image, and provide citations for your response.
|
@@ -264,6 +263,8 @@ def is_example_image(image, examples):
|
|
264 |
return False, None
|
265 |
|
266 |
# Main processing function
|
|
|
|
|
267 |
def process_image(image, question, confidence_threshold, examples=None):
|
268 |
if image is None:
|
269 |
return None, "Please upload an image", []
|
|
|
12 |
import hashlib
|
13 |
import spaces # Make sure to import spaces
|
14 |
|
15 |
+
|
|
|
16 |
|
17 |
#First output the thinking process in <think> </think> tags and then output the final answer in <answer> </answer> tags.
|
18 |
#Answer the following question based on the information above and the given image, and provide citations for your response.
|
|
|
263 |
return False, None
|
264 |
|
265 |
# Main processing function
|
266 |
+
# This is the function that will run on the GPU
|
267 |
+
@spaces.GPU
|
268 |
def process_image(image, question, confidence_threshold, examples=None):
|
269 |
if image is None:
|
270 |
return None, "Please upload an image", []
|