Spaces:
Sleeping
Sleeping
Remove unsqueeze for semantic tokens
Browse files
app.py
CHANGED
@@ -92,7 +92,7 @@ class Predictor(object):
|
|
92 |
concepts, scores = self.model.predict_concept(outputs["sem_embeds"][mask_index])
|
93 |
concepts, scores = [x.reshape(batch_shape) for x in (concepts, scores)]
|
94 |
# Generate captions.
|
95 |
-
sem_tokens = outputs["sem_tokens"][mask_index]
|
96 |
captions = self.model.generate_text(sem_tokens).reshape(batch_shape)
|
97 |
# Postprocess results.
|
98 |
results = []
|
|
|
92 |
concepts, scores = self.model.predict_concept(outputs["sem_embeds"][mask_index])
|
93 |
concepts, scores = [x.reshape(batch_shape) for x in (concepts, scores)]
|
94 |
# Generate captions.
|
95 |
+
sem_tokens = outputs["sem_tokens"][mask_index]
|
96 |
captions = self.model.generate_text(sem_tokens).reshape(batch_shape)
|
97 |
# Postprocess results.
|
98 |
results = []
|