Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -60,6 +60,13 @@ def generate_answer_blip(processor, model, image, question):
|
|
60 |
# prepare image + question
|
61 |
inputs = processor(images=image, text=question, return_tensors="pt")
|
62 |
print('blip')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
generated_ids = model.generate(**inputs, max_length=50, output_scores=True)
|
64 |
print(generated_ids)
|
65 |
generated_answer = processor.batch_decode(generated_ids, skip_special_tokens=True)
|
|
|
60 |
# prepare image + question
|
61 |
inputs = processor(images=image, text=question, return_tensors="pt")
|
62 |
print('blip')
|
63 |
+
|
64 |
+
|
65 |
+
inputs = processor(image, question, return_tensors="pt")
|
66 |
+
out = model.generate(**inputs)
|
67 |
+
print(processor.decode(out[0], skip_special_tokens=True))
|
68 |
+
print(out)
|
69 |
+
|
70 |
generated_ids = model.generate(**inputs, max_length=50, output_scores=True)
|
71 |
print(generated_ids)
|
72 |
generated_answer = processor.batch_decode(generated_ids, skip_special_tokens=True)
|