fffiloni commited on
Commit
cb86cb3
1 Parent(s): 767d60d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -33,7 +33,7 @@ def infer(image_input):
33
 
34
 
35
  llama_q = f"""
36
- I'll give you a simple image caption, from i want you to provide a story that would fit well with the image:
37
  '{clipi_result[0]}'
38
 
39
  """
@@ -118,7 +118,7 @@ with gr.Blocks(css=css) as demo:
118
  )
119
  with gr.Row():
120
  with gr.Column():
121
- image_in = gr.Image(label="Image input", type="filepath", elem_id="image-in")
122
  submit_btn = gr.Button('Tell me a story')
123
  with gr.Column():
124
  #caption = gr.Textbox(label="Generated Caption")
@@ -128,14 +128,14 @@ with gr.Blocks(css=css) as demo:
128
  community_icon = gr.HTML(community_icon_html)
129
  loading_icon = gr.HTML(loading_icon_html)
130
  share_button = gr.Button("Share to community", elem_id="share-btn")
131
- """
132
  gr.Examples(examples=[["./examples/crabby.png"],["./examples/hopper.jpeg"]],
133
  fn=infer,
134
  inputs=[image_in],
135
  outputs=[story, share_group],
136
  cache_examples=True
137
  )
138
- """
139
  submit_btn.click(fn=infer, inputs=[image_in], outputs=[story, share_group])
140
  share_button.click(None, [], [], _js=share_js)
141
 
 
33
 
34
 
35
  llama_q = f"""
36
+ I'll give you a simple image caption, from i want you to provide a story that would fit well with the image, be creative:
37
  '{clipi_result[0]}'
38
 
39
  """
 
118
  )
119
  with gr.Row():
120
  with gr.Column():
121
+ image_in = gr.Image(label="Image input", type="filepath", elem_id="image-in", height=420)
122
  submit_btn = gr.Button('Tell me a story')
123
  with gr.Column():
124
  #caption = gr.Textbox(label="Generated Caption")
 
128
  community_icon = gr.HTML(community_icon_html)
129
  loading_icon = gr.HTML(loading_icon_html)
130
  share_button = gr.Button("Share to community", elem_id="share-btn")
131
+
132
  gr.Examples(examples=[["./examples/crabby.png"],["./examples/hopper.jpeg"]],
133
  fn=infer,
134
  inputs=[image_in],
135
  outputs=[story, share_group],
136
  cache_examples=True
137
  )
138
+
139
  submit_btn.click(fn=infer, inputs=[image_in], outputs=[story, share_group])
140
  share_button.click(None, [], [], _js=share_js)
141