jykoh commited on
Commit
2b66265
1 Parent(s): 1841b37

Remove pointer event on community button

Browse files
Files changed (2) hide show
  1. app.py +4 -4
  2. share_btn.py +3 -3
app.py CHANGED
@@ -172,7 +172,7 @@ with gr.Blocks(css=css) as demo:
172
  share_button = gr.Button("🤗 Share to Community", elem_id="share-btn")
173
 
174
 
175
- with gr.Column(scale=0.3, min_width=200):
176
  ret_scale_factor = gr.Slider(minimum=0.0, maximum=3.0, value=1.0, step=0.1, interactive=True,
177
  label="Frequency multiplier for returning images (higher means more frequent)")
178
  max_ret_images = gr.Number(
@@ -182,9 +182,9 @@ with gr.Blocks(css=css) as demo:
182
  gr_temperature = gr.Slider(
183
  minimum=0.0, maximum=1.0, value=0.0, interactive=True, label="Temperature (0 for deterministic, higher for more randomness)")
184
 
185
- gallery = gr.Gallery(
186
- value=[Image.open(e) for e in examples], label="Example Conversations", show_label=True, elem_id="gallery",
187
- ).style(grid=[2], height="auto")
188
 
189
  text_input.submit(generate_for_prompt, [text_input, gr_state, ret_scale_factor,
190
  max_ret_images, gr_max_len, gr_temperature], [gr_state, chatbot, share_group, save_group])
 
172
  share_button = gr.Button("🤗 Share to Community", elem_id="share-btn")
173
 
174
 
175
+ with gr.Column(scale=0.3, min_width=400):
176
  ret_scale_factor = gr.Slider(minimum=0.0, maximum=3.0, value=1.0, step=0.1, interactive=True,
177
  label="Frequency multiplier for returning images (higher means more frequent)")
178
  max_ret_images = gr.Number(
 
182
  gr_temperature = gr.Slider(
183
  minimum=0.0, maximum=1.0, value=0.0, interactive=True, label="Temperature (0 for deterministic, higher for more randomness)")
184
 
185
+ gallery = gr.Gallery(
186
+ value=[Image.open(e) for e in examples], label="Example Conversations", show_label=True, elem_id="gallery",
187
+ ).style(grid=[5], height="auto", container=True)
188
 
189
  text_input.submit(generate_for_prompt, [text_input, gr_state, ret_scale_factor,
190
  max_ret_images, gr_max_len, gr_temperature], [gr_state, chatbot, share_group, save_group])
share_btn.py CHANGED
@@ -48,8 +48,8 @@ async () => {
48
  console.log(urlChatbotImage);
49
  let titleTxt = `FROMAGe`;
50
 
51
- const shareBtnEl = gradioEl.querySelector('#share-btn');
52
- shareBtnEl.style.pointerEvents = 'none';
53
  const descriptionMd = `
54
 
55
  <img src='${urlChatbotImage}'>
@@ -60,7 +60,7 @@ async () => {
60
  });
61
  const paramsStr = params.toString();
62
  window.open(`https://huggingface.co/spaces/jykoh/fromage/discussions/new?${paramsStr}`, '_blank');
63
- shareBtnEl.style.removeProperty('pointer-events');
64
  }
65
  """
66
 
 
48
  console.log(urlChatbotImage);
49
  let titleTxt = `FROMAGe`;
50
 
51
+ //const shareBtnEl = gradioEl.querySelector('#share-btn');
52
+ //shareBtnEl.style.pointerEvents = 'none';
53
  const descriptionMd = `
54
 
55
  <img src='${urlChatbotImage}'>
 
60
  });
61
  const paramsStr = params.toString();
62
  window.open(`https://huggingface.co/spaces/jykoh/fromage/discussions/new?${paramsStr}`, '_blank');
63
+ //shareBtnEl.style.removeProperty('pointer-events');
64
  }
65
  """
66