Spaces:
Build error
Build error
Remove pointer event on community button
Browse files- app.py +4 -4
- 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=
|
| 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 |
-
|
| 186 |
-
|
| 187 |
-
|
| 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 |
|