RamAnanth1 commited on
Commit
f371976
1 Parent(s): 9b9d533

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -0
app.py CHANGED
@@ -44,6 +44,9 @@ theme = gr.themes.Monochrome(
44
  )
45
  css = ".generating {visibility: hidden}"
46
 
 
 
 
47
  with gr.Blocks(theme=theme, analytics_enabled=False,css=css) as demo:
48
  gr.Markdown("## InstructBLIP: Towards General-purpose Vision-Language Models with Instruction Tuning")
49
  gr.Markdown(
@@ -120,6 +123,13 @@ with gr.Blocks(theme=theme, analytics_enabled=False,css=css) as demo:
120
  interactive=True,
121
  label="Repetition Penalty",
122
  )
 
 
 
 
 
 
 
123
 
124
  submit.click(infer, inputs=[image_input, prompt_textbox, min_len, max_len, beam_size, len_penalty, repetition_penalty, top_p, sampling], outputs=[output])
125
 
 
44
  )
45
  css = ".generating {visibility: hidden}"
46
 
47
+ examples = [
48
+ ["banff.jpg", "Can you tell me about this image in detail", 1, 200, 5, 1, 3, 0.9, "Nucleus sampling"]
49
+ ]
50
  with gr.Blocks(theme=theme, analytics_enabled=False,css=css) as demo:
51
  gr.Markdown("## InstructBLIP: Towards General-purpose Vision-Language Models with Instruction Tuning")
52
  gr.Markdown(
 
123
  interactive=True,
124
  label="Repetition Penalty",
125
  )
126
+ gr.Examples(
127
+ examples=examples,
128
+ inputs=[image_input, prompt_textbox, min_len, max_len, beam_size, len_penalty, repetition_penalty, top_p, sampling],
129
+ cache_examples=False,
130
+ fn=infer,
131
+ outputs=[output],
132
+ )
133
 
134
  submit.click(infer, inputs=[image_input, prompt_textbox, min_len, max_len, beam_size, len_penalty, repetition_penalty, top_p, sampling], outputs=[output])
135