Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,7 @@ def generate(model_name, image, text):
|
|
16 |
print("Generating!")
|
17 |
# Wrap the model call in a try-except block to capture and debug CUDA errors
|
18 |
try:
|
19 |
-
result = model_pipe(images=[image], texts=[text]).cpu()[0][0] # Perform the model inference
|
20 |
print("Result", result)
|
21 |
except RuntimeError as e:
|
22 |
print(f"RuntimeError during model inference: {e}")
|
|
|
16 |
print("Generating!")
|
17 |
# Wrap the model call in a try-except block to capture and debug CUDA errors
|
18 |
try:
|
19 |
+
result = model_pipe(images=[image], texts=[text]).cpu()[0][0].item() # Perform the model inference
|
20 |
print("Result", result)
|
21 |
except RuntimeError as e:
|
22 |
print(f"RuntimeError during model inference: {e}")
|