Spaces:
Sleeping
Sleeping
sanjanatule
commited on
Commit
•
ba525e7
1
Parent(s):
4e448ea
Update app.py
Browse files
app.py
CHANGED
@@ -100,7 +100,7 @@ def model_generate_ans(img=None,img_audio=None,val_q=None):
|
|
100 |
next_token_embeds = phi_model.model.embed_tokens(predicted_word_token) # 4,1,2560
|
101 |
val_combined_embeds = torch.cat([val_combined_embeds, next_token_embeds], dim=1)
|
102 |
|
103 |
-
predicted_captions_decoded = tokenizer.batch_decode(predicted_caption,ignore_index = 50256)
|
104 |
|
105 |
return predicted_captions_decoded
|
106 |
|
|
|
100 |
next_token_embeds = phi_model.model.embed_tokens(predicted_word_token) # 4,1,2560
|
101 |
val_combined_embeds = torch.cat([val_combined_embeds, next_token_embeds], dim=1)
|
102 |
|
103 |
+
predicted_captions_decoded = tokenizer.batch_decode(predicted_caption,ignore_index = 50256)[0]
|
104 |
|
105 |
return predicted_captions_decoded
|
106 |
|