Spaces:
Running
Running
Sebastiankay
commited on
Commit
·
115e300
1
Parent(s):
41e2ba5
Sep 10, 2024, 2:35 PM
Browse files
app.py
CHANGED
@@ -248,8 +248,9 @@ with gr.Blocks(theme=theme, head=custom_head, css=custom_css, js=custom_js, titl
|
|
248 |
image_ratio_buttons.input(fn=calculate_ratio_values, inputs=[image_ratio_buttons, image_width, image_height], outputs=[image_width, image_height], show_progress="hidden")
|
249 |
|
250 |
js_check_empty_prompt = """
|
251 |
-
function js_check_empty_prompt(
|
252 |
-
|
|
|
253 |
document.querySelector("#random_prompt_btn").click()
|
254 |
}
|
255 |
}
|
|
|
248 |
image_ratio_buttons.input(fn=calculate_ratio_values, inputs=[image_ratio_buttons, image_width, image_height], outputs=[image_width, image_height], show_progress="hidden")
|
249 |
|
250 |
js_check_empty_prompt = """
|
251 |
+
function js_check_empty_prompt() {
|
252 |
+
const prompt_textinput = document.querySelector("#prompt_input > label > textarea")
|
253 |
+
if prompt_textinput.value === "" {
|
254 |
document.querySelector("#random_prompt_btn").click()
|
255 |
}
|
256 |
}
|