akshit-g commited on
Commit
6287146
·
verified ·
1 Parent(s): 9f69876

Update webcam_gradio_demo.py

Browse files
Files changed (1) hide show
  1. webcam_gradio_demo.py +1 -1
webcam_gradio_demo.py CHANGED
@@ -29,7 +29,7 @@ moondream = AutoModelForCausalLM.from_pretrained(
29
  ).to(device=device, dtype=dtype)
30
  moondream.eval()
31
 
32
-
33
  def answer_question(img, prompt):
34
  image_embeds = moondream.encode_image(img)
35
  streamer = TextIteratorStreamer(tokenizer, skip_special_tokens=True)
 
29
  ).to(device=device, dtype=dtype)
30
  moondream.eval()
31
 
32
+ @spaces.GPU(duration=10)
33
  def answer_question(img, prompt):
34
  image_embeds = moondream.encode_image(img)
35
  streamer = TextIteratorStreamer(tokenizer, skip_special_tokens=True)