visheratin commited on
Commit
e0c666b
·
verified ·
1 Parent(s): b7864ca

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -68,7 +68,7 @@ def answer_question(image, question, max_crops, num_tokens):
68
  for new_text in streamer:
69
  buffer += new_text
70
  if len(buffer) > 1:
71
- yield buffer
72
 
73
 
74
  with gr.Blocks() as demo:
@@ -95,4 +95,4 @@ with gr.Blocks() as demo:
95
  submit.click(answer_question, [img, prompt, max_crops, num_tokens], output)
96
  prompt.submit(answer_question, [img, prompt, max_crops, num_tokens], output)
97
 
98
- demo.queue().launch(debug=True)
 
68
  for new_text in streamer:
69
  buffer += new_text
70
  if len(buffer) > 1:
71
+ yield buffer.replace(prompt, "")
72
 
73
 
74
  with gr.Blocks() as demo:
 
95
  submit.click(answer_question, [img, prompt, max_crops, num_tokens], output)
96
  prompt.submit(answer_question, [img, prompt, max_crops, num_tokens], output)
97
 
98
+ demo.queue().launch(debug=True, share=True)