Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -22,10 +22,7 @@ moondream.eval()
|
|
22 |
def answer_questions(image_tuples, prompt_text):
|
23 |
result = ""
|
24 |
|
25 |
-
|
26 |
-
prompts = [p.strip() for p in prompt_text.split(',')] # Splitting and cleaning prompts
|
27 |
-
#print(f"prompts: {prompts}\n")
|
28 |
-
|
29 |
image_embeds = [img[0] for img in image_tuples if img[0] is not None] # Extracting images from tuples, ignoring None
|
30 |
|
31 |
# Check if the lengths of image_embeds and prompts are equal
|
@@ -39,9 +36,6 @@ def answer_questions(image_tuples, prompt_text):
|
|
39 |
)
|
40 |
|
41 |
for question, answer in zip(prompts, answers):
|
42 |
-
#print(f"Q: {question}")
|
43 |
-
#print(f"A: {answer}")
|
44 |
-
#print()
|
45 |
result += (f"Q: {question}\nA: {answer}\n\n")
|
46 |
|
47 |
return result
|
|
|
22 |
def answer_questions(image_tuples, prompt_text):
|
23 |
result = ""
|
24 |
|
25 |
+
prompts = [p.strip() for p in prompt_text.split(',')] # Splitting and cleaning prompts
|
|
|
|
|
|
|
26 |
image_embeds = [img[0] for img in image_tuples if img[0] is not None] # Extracting images from tuples, ignoring None
|
27 |
|
28 |
# Check if the lengths of image_embeds and prompts are equal
|
|
|
36 |
)
|
37 |
|
38 |
for question, answer in zip(prompts, answers):
|
|
|
|
|
|
|
39 |
result += (f"Q: {question}\nA: {answer}\n\n")
|
40 |
|
41 |
return result
|