Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -21,8 +21,10 @@ moondream.eval()
|
|
21 |
@spaces.GPU(duration=10)
|
22 |
def answer_questions(image_tuples, prompt_text):
|
23 |
prompts = [p.strip() for p in prompt_text.split(',')] # Splitting and cleaning prompts
|
24 |
-
|
25 |
-
image_embeds = [
|
|
|
|
|
26 |
answers = moondream.batch_answer(
|
27 |
images=image_embeds,
|
28 |
prompts=prompts,
|
|
|
21 |
@spaces.GPU(duration=10)
|
22 |
def answer_questions(image_tuples, prompt_text):
|
23 |
prompts = [p.strip() for p in prompt_text.split(',')] # Splitting and cleaning prompts
|
24 |
+
print(f"split prompts:\n{prompts}\n")
|
25 |
+
image_embeds = [img[0] for img in image_tuples if img[0] is not None] # Extracting images from tuples, ignoring None
|
26 |
+
print(f"image_embeds:\n{image_embeds}\n")
|
27 |
+
#image_embeds = [moondream.encode_image(img) for img in images]
|
28 |
answers = moondream.batch_answer(
|
29 |
images=image_embeds,
|
30 |
prompts=prompts,
|