Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -37,7 +37,7 @@ moondream.eval()
|
|
37 |
@spaces.GPU(duration=10)
|
38 |
def answer_question(img, prompt):
|
39 |
if img is None:
|
40 |
-
|
41 |
|
42 |
image_embeds = moondream.encode_image(img)
|
43 |
streamer = TextIteratorStreamer(tokenizer, skip_special_tokens=True)
|
@@ -61,7 +61,7 @@ def answer_question(img, prompt):
|
|
61 |
@spaces.GPU(duration=10)
|
62 |
def caption(img, mode):
|
63 |
if img is None:
|
64 |
-
|
65 |
|
66 |
streamer = TextIteratorStreamer(tokenizer, skip_special_tokens=True)
|
67 |
thread = Thread(
|
|
|
37 |
@spaces.GPU(duration=10)
|
38 |
def answer_question(img, prompt):
|
39 |
if img is None:
|
40 |
+
yield ""
|
41 |
|
42 |
image_embeds = moondream.encode_image(img)
|
43 |
streamer = TextIteratorStreamer(tokenizer, skip_special_tokens=True)
|
|
|
61 |
@spaces.GPU(duration=10)
|
62 |
def caption(img, mode):
|
63 |
if img is None:
|
64 |
+
yield ""
|
65 |
|
66 |
streamer = TextIteratorStreamer(tokenizer, skip_special_tokens=True)
|
67 |
thread = Thread(
|