Upload moondream.py
Browse files- moondream.py +2 -1
moondream.py
CHANGED
|
@@ -113,7 +113,7 @@ class Moondream(PreTrainedModel):
|
|
| 113 |
else:
|
| 114 |
return cleaned_answer
|
| 115 |
"""
|
| 116 |
-
def answer_question(
|
| 117 |
self,
|
| 118 |
image_embeds,
|
| 119 |
question,
|
|
@@ -132,6 +132,7 @@ class Moondream(PreTrainedModel):
|
|
| 132 |
|
| 133 |
for output_id in output_ids:
|
| 134 |
yield tokenizer.decode(output_id, skip_special_tokens=True)
|
|
|
|
| 135 |
def batch_answer(
|
| 136 |
self,
|
| 137 |
images,
|
|
|
|
| 113 |
else:
|
| 114 |
return cleaned_answer
|
| 115 |
"""
|
| 116 |
+
async def answer_question(
|
| 117 |
self,
|
| 118 |
image_embeds,
|
| 119 |
question,
|
|
|
|
| 132 |
|
| 133 |
for output_id in output_ids:
|
| 134 |
yield tokenizer.decode(output_id, skip_special_tokens=True)
|
| 135 |
+
|
| 136 |
def batch_answer(
|
| 137 |
self,
|
| 138 |
images,
|