zhiqiulin commited on
Commit
e8710d7
·
verified ·
1 Parent(s): 0f8e3cc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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() # 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] # Perform the model inference
20
  print("Result", result)
21
  except RuntimeError as e:
22
  print(f"RuntimeError during model inference: {e}")