sessex commited on
Commit
69b4d88
·
verified ·
1 Parent(s): 3c205df

remove markdown

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -21,7 +21,7 @@ moondream = AutoModelForCausalLM.from_pretrained(
21
  moondream.eval()
22
 
23
 
24
- @spaces.GPU(duration=10)
25
  def answer_question(img, prompt):
26
  image_embeds = moondream.encode_image(img)
27
  streamer = TextIteratorStreamer(tokenizer, skip_special_tokens=True)
@@ -88,11 +88,11 @@ with gr.Blocks() as demo:
88
  with gr.Row():
89
  img = gr.Image(type="pil", label="Upload an Image")
90
  with gr.Column():
91
- output = gr.Markdown(label="Response")
92
  ann = gr.Image(visible=False, label="Annotated Image")
93
 
94
  submit.click(answer_question, [img, prompt], output)
95
  prompt.submit(answer_question, [img, prompt], output)
96
  # output.change(process_answer, [img, output], ann, show_progress=False)
97
 
98
- demo.queue().launch()
 
21
  moondream.eval()
22
 
23
 
24
+ @spaces.GPU(duration=20)
25
  def answer_question(img, prompt):
26
  image_embeds = moondream.encode_image(img)
27
  streamer = TextIteratorStreamer(tokenizer, skip_special_tokens=True)
 
88
  with gr.Row():
89
  img = gr.Image(type="pil", label="Upload an Image")
90
  with gr.Column():
91
+ output = gr.Text(label="Response")
92
  ann = gr.Image(visible=False, label="Annotated Image")
93
 
94
  submit.click(answer_question, [img, prompt], output)
95
  prompt.submit(answer_question, [img, prompt], output)
96
  # output.change(process_answer, [img, output], ann, show_progress=False)
97
 
98
+ demo.queue().launch(debug=True)