merve HF staff commited on
Commit
87d53f8
1 Parent(s): f9bc706

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -35,7 +35,7 @@ def infer(
35
  do_sample=False
36
  )
37
  result = processor.batch_decode(generated_ids, skip_special_tokens=True)
38
- return result[0][len(text):]
39
 
40
  ##### Parse segmentation output tokens into masks
41
  ##### Also returns bounding boxes with their labels
@@ -85,7 +85,7 @@ for detailed information how to use and fine-tune PaliGemma models.
85
 
86
  with gr.Blocks(css="style.css") as demo:
87
  gr.Markdown(INTRO_TEXT)
88
- with gr.Tab("Conversation"):
89
  with gr.Column():
90
  image = gr.Image(type="pil")
91
  text_input = gr.Text(label="Input Text")
 
35
  do_sample=False
36
  )
37
  result = processor.batch_decode(generated_ids, skip_special_tokens=True)
38
+ return result[0][len(text):].lstrip("\n")
39
 
40
  ##### Parse segmentation output tokens into masks
41
  ##### Also returns bounding boxes with their labels
 
85
 
86
  with gr.Blocks(css="style.css") as demo:
87
  gr.Markdown(INTRO_TEXT)
88
+ with gr.Tab("Text Generation"):
89
  with gr.Column():
90
  image = gr.Image(type="pil")
91
  text_input = gr.Text(label="Input Text")