vikhyatk commited on
Commit
51b253e
·
verified ·
1 Parent(s): af49597

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -122,7 +122,7 @@ def answer_question(img, prompt, reasoning):
122
  {"start": g["start_idx"], "end": g["end_idx"], "entity": json.dumps(g["points"])}
123
  for g in resp["reasoning"]["grounding"]
124
  ] if reasoning else []
125
- for new_text in moondream.query(img, prompt, stream=True)["answer"]:
126
  buffer += new_text
127
  yield buffer.strip(), {"text": reasoning_text, "entities": entities}
128
 
 
122
  {"start": g["start_idx"], "end": g["end_idx"], "entity": json.dumps(g["points"])}
123
  for g in resp["reasoning"]["grounding"]
124
  ] if reasoning else []
125
+ for new_text in resp["answer"]:
126
  buffer += new_text
127
  yield buffer.strip(), {"text": reasoning_text, "entities": entities}
128