vikhyatk commited on
Commit
13b9696
·
verified ·
1 Parent(s): f525430

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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
- return
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
- return
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(