Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -40,7 +40,7 @@ def generate_answer_git(processor, model, image, question):
|
|
40 |
input_ids = torch.tensor(input_ids).unsqueeze(0)
|
41 |
|
42 |
generated_ids = model.generate(pixel_values=pixel_values, input_ids=input_ids, max_length=50, output_scores=True)
|
43 |
-
print(generated_ids)
|
44 |
generated_answer = processor.batch_decode(generated_ids, skip_special_tokens=True)
|
45 |
|
46 |
return generated_answer
|
|
|
40 |
input_ids = torch.tensor(input_ids).unsqueeze(0)
|
41 |
|
42 |
generated_ids = model.generate(pixel_values=pixel_values, input_ids=input_ids, max_length=50, output_scores=True)
|
43 |
+
print(generated_ids.scores)
|
44 |
generated_answer = processor.batch_decode(generated_ids, skip_special_tokens=True)
|
45 |
|
46 |
return generated_answer
|