developer0hye commited on
Commit
f477c93
ยท
verified ยท
1 Parent(s): aec39e5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -1
app.py CHANGED
@@ -172,7 +172,17 @@ with gr.Blocks(css=css, theme="origin") as demo:
172
  # Right column: model output
173
  with gr.Column(scale=1):
174
  output_text = gr.Textbox(label="Model Output", elem_id="output_text")
175
-
 
 
 
 
 
 
 
 
 
 
176
  submit_btn.click(internvl_inference, [input_image, text_input], [output_text])
177
 
178
  if __name__ == "__main__":
 
172
  # Right column: model output
173
  with gr.Column(scale=1):
174
  output_text = gr.Textbox(label="Model Output", elem_id="output_text")
175
+
176
+ # ๐Ÿ”ฝ ์˜ˆ์ œ ์ถ”๊ฐ€
177
+ gr.Examples(
178
+ examples=[["example.webp", "explain this image"]],
179
+ inputs=[input_image, text_input],
180
+ outputs=output_text,
181
+ fn=internvl_inference, # ํด๋ฆญ ์‹œ ๋ฐ”๋กœ ์‹คํ–‰ํ•˜๋ ค๋ฉด ์ง€์ •
182
+ cache_examples=True, # ๊ฒฐ๊ณผ ์บ์‹œ(์„ ํƒ)
183
+ label="Try an example" # ํ‘œ๊ธฐ๋ช…(์„ ํƒ)
184
+ )
185
+
186
  submit_btn.click(internvl_inference, [input_image, text_input], [output_text])
187
 
188
  if __name__ == "__main__":