Update app.py
Browse files
app.py
CHANGED
|
@@ -79,7 +79,7 @@ def generate_caption_and_image(image, f, p, d):
|
|
| 79 |
|
| 80 |
caption2 = processor.decode(out[0], skip_special_tokens=True)
|
| 81 |
|
| 82 |
-
|
| 83 |
inputs = processor(image, return_tensors="pt", padding=True, truncation=True, max_length=250)
|
| 84 |
inputs = {key: val.to(device) for key, val in inputs.items()}
|
| 85 |
out = model.generate(**inputs)
|
|
|
|
| 79 |
|
| 80 |
caption2 = processor.decode(out[0], skip_special_tokens=True)
|
| 81 |
|
| 82 |
+
|
| 83 |
inputs = processor(image, return_tensors="pt", padding=True, truncation=True, max_length=250)
|
| 84 |
inputs = {key: val.to(device) for key, val in inputs.items()}
|
| 85 |
out = model.generate(**inputs)
|