Spaces:
Runtime error
Runtime error
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]) # Perform the model inference
|
| 20 |
except RuntimeError as e:
|
| 21 |
print(f"RuntimeError during model inference: {e}")
|
| 22 |
raise 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() # Perform the model inference
|
| 20 |
except RuntimeError as e:
|
| 21 |
print(f"RuntimeError during model inference: {e}")
|
| 22 |
raise e
|