Spaces:
Running
on
Zero
Running
on
Zero
Update demo.py
Browse files
demo.py
CHANGED
|
@@ -94,6 +94,9 @@ def visualize_gaze_multi(face_boxes, gaze_points, image=None, show_plot=True):
|
|
| 94 |
|
| 95 |
@spaces.GPU(duration=15)
|
| 96 |
def process_image(input_image):
|
|
|
|
|
|
|
|
|
|
| 97 |
try:
|
| 98 |
# Convert to PIL Image if needed
|
| 99 |
if isinstance(input_image, np.ndarray):
|
|
|
|
| 94 |
|
| 95 |
@spaces.GPU(duration=15)
|
| 96 |
def process_image(input_image):
|
| 97 |
+
if input_image is None:
|
| 98 |
+
return None, ""
|
| 99 |
+
|
| 100 |
try:
|
| 101 |
# Convert to PIL Image if needed
|
| 102 |
if isinstance(input_image, np.ndarray):
|