jykoh commited on
Commit
777823b
1 Parent(s): 9850537

UI changes

Browse files
Files changed (1) hide show
  1. app.py +9 -11
app.py CHANGED
@@ -36,7 +36,6 @@ css = """
36
  """
37
 
38
  examples = [
39
- # [[[], [], None], [("Show me some pictures in action?"), ('OK')]],
40
  ]
41
 
42
  # Download model from HF Hub.
@@ -148,12 +147,6 @@ with gr.Blocks(css=css) as demo:
148
 
149
  gr_state = gr.State([[], [], None]) # chat_history, input_image
150
 
151
- with gr.Row(visible=False) as share_group:
152
- with gr.Group(elem_id="share-btn-container"):
153
- community_icon = gr.HTML(community_icon_html)
154
- loading_icon = gr.HTML(loading_icon_html)
155
- share_button = gr.Button("Share to community", elem_id="share-btn")
156
-
157
  with gr.Row():
158
  with gr.Column(scale=0.7, min_width=500):
159
  with gr.Row():
@@ -168,6 +161,12 @@ with gr.Blocks(css=css) as demo:
168
  "Submit", interactive=True, variant="primary")
169
  clear_last_btn = gr.Button("Undo")
170
  clear_btn = gr.Button("Reset All")
 
 
 
 
 
 
171
 
172
  with gr.Column(scale=0.3, min_width=200):
173
  ret_scale_factor = gr.Slider(minimum=0.0, maximum=3.0, value=1.0, step=0.1, interactive=True,
@@ -179,10 +178,9 @@ with gr.Blocks(css=css) as demo:
179
  gr_temperature = gr.Slider(
180
  minimum=0.0, maximum=1.0, value=0.0, interactive=True, label="Temperature (0 for deterministic, higher for more randomness)")
181
 
182
- examples = gr.Examples(
183
- examples=examples,
184
- inputs=[gr_state, chatbot],
185
- )
186
 
187
  text_input.submit(generate_for_prompt, [text_input, gr_state, ret_scale_factor,
188
  max_ret_images, gr_max_len, gr_temperature], [gr_state, chatbot, share_group])
 
36
  """
37
 
38
  examples = [
 
39
  ]
40
 
41
  # Download model from HF Hub.
 
147
 
148
  gr_state = gr.State([[], [], None]) # chat_history, input_image
149
 
 
 
 
 
 
 
150
  with gr.Row():
151
  with gr.Column(scale=0.7, min_width=500):
152
  with gr.Row():
 
161
  "Submit", interactive=True, variant="primary")
162
  clear_last_btn = gr.Button("Undo")
163
  clear_btn = gr.Button("Reset All")
164
+ with gr.Row(visible=False) as share_group:
165
+ with gr.Group(elem_id="share-btn-container"):
166
+ community_icon = gr.HTML(community_icon_html)
167
+ loading_icon = gr.HTML(loading_icon_html)
168
+ share_button = gr.Button("Share to community", elem_id="share-btn")
169
+
170
 
171
  with gr.Column(scale=0.3, min_width=200):
172
  ret_scale_factor = gr.Slider(minimum=0.0, maximum=3.0, value=1.0, step=0.1, interactive=True,
 
178
  gr_temperature = gr.Slider(
179
  minimum=0.0, maximum=1.0, value=0.0, interactive=True, label="Temperature (0 for deterministic, higher for more randomness)")
180
 
181
+ # gallery = gr.Gallery(
182
+ # value=examples, label="Example Conversations", show_label=True, elem_id="gallery",
183
+ # ).style(grid=[2], height="auto")
 
184
 
185
  text_input.submit(generate_for_prompt, [text_input, gr_state, ret_scale_factor,
186
  max_ret_images, gr_max_len, gr_temperature], [gr_state, chatbot, share_group])