Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -11,7 +11,7 @@ processor = gen_model.VLMProcessor.from_pretrained("unum-cloud/uform-gen")
|
|
| 11 |
@spaces.GPU
|
| 12 |
def generate_caption(image, prompt):
|
| 13 |
# Process the image and the prompt
|
| 14 |
-
inputs = processor(texts=[prompt], images=[image], return_tensors="pt")
|
| 15 |
|
| 16 |
# Generate the output
|
| 17 |
with torch.inference_mode():
|
|
|
|
| 11 |
@spaces.GPU
|
| 12 |
def generate_caption(image, prompt):
|
| 13 |
# Process the image and the prompt
|
| 14 |
+
inputs = processor(texts=[prompt], images=[image], return_tensors="pt").to('cuda')
|
| 15 |
|
| 16 |
# Generate the output
|
| 17 |
with torch.inference_mode():
|