aixsatoshi commited on
Commit
b29a047
1 Parent(s): 8ff201d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -1
app.py CHANGED
@@ -82,7 +82,7 @@ with gr.Blocks() as demo:
82
  with gr.Row():
83
  text_input = gr.Textbox(label="Text Prompt", placeholder="e.g. Describe the image.")
84
  image_input = gr.Textbox(label="Image URL", placeholder="e.g. https://example.com/image.png")
85
-
86
  result_output = gr.Textbox(label="Model Output", lines=8, max_lines=20) # 高さ500ピクセルに相当するように調整
87
  image_output = gr.HTML(label="Input Image") # 入力画像URLを表示するための場所
88
 
@@ -97,4 +97,14 @@ with gr.Blocks() as demo:
97
  outputs=[title, text_input, image_input, result_output, image_output, submit_button]
98
  )
99
 
 
 
 
 
 
 
 
 
 
 
100
  demo.launch()
 
82
  with gr.Row():
83
  text_input = gr.Textbox(label="Text Prompt", placeholder="e.g. Describe the image.")
84
  image_input = gr.Textbox(label="Image URL", placeholder="e.g. https://example.com/image.png")
85
+
86
  result_output = gr.Textbox(label="Model Output", lines=8, max_lines=20) # 高さ500ピクセルに相当するように調整
87
  image_output = gr.HTML(label="Input Image") # 入力画像URLを表示するための場所
88
 
 
97
  outputs=[title, text_input, image_input, result_output, image_output, submit_button]
98
  )
99
 
100
+ # 例の設定
101
+ examples = [
102
+ ["Describe the scene.", "https://assets.st-note.com/production/uploads/images/138094970/rectangle_large_type_2_bc1a73623dc0e9bf8799832ddb4cd53e.png"],
103
+ ["Describe the image.", "https://huggingface.co/datasets/patrickvonplaten/random_img/resolve/main/yosemite.png"],
104
+ ["Describe the random generated image.", "https://picsum.photos/seed/picsum/200/300"],
105
+ ["Describe the image.", "https://picsum.photos/id/32/512/512"]
106
+ ]
107
+
108
+ gr.Examples(examples=examples, inputs=[text_input, image_input], label="Example Inputs")
109
+
110
  demo.launch()