Spaces:
Runtime error
Runtime error
Commit
·
af8be4b
1
Parent(s):
755c0b3
Update app.py
Browse filesbugfix, I'm dumb
app.py
CHANGED
|
@@ -62,30 +62,31 @@ with gr.Blocks(theme='NoCrypt/miku') as demo:
|
|
| 62 |
)
|
| 63 |
check = gr.Checkbox(label="Go")
|
| 64 |
with gr.Column(variant="panel", scale=2):
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
|
|
|
| 70 |
with gr.Row():
|
| 71 |
go_btn = gr.Button("Go", label="Primary Button", variant="primary")
|
| 72 |
clear_btn = gr.Button(
|
| 73 |
"Clear", label="Secondary Button", variant="secondary"
|
| 74 |
)
|
| 75 |
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
|
| 81 |
-
|
| 82 |
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
|
| 88 |
-
|
| 89 |
|
| 90 |
with gr.Row():
|
| 91 |
btn1 = gr.Button("Button 1").style(size="sm")
|
|
|
|
| 62 |
)
|
| 63 |
check = gr.Checkbox(label="Go")
|
| 64 |
with gr.Column(variant="panel", scale=2):
|
| 65 |
+
Commented out the image
|
| 66 |
+
img = gr.Image(
|
| 67 |
+
#"https://i.ibb.co/F4hKFrZ/dark-miku.webp",
|
| 68 |
+
"https://gradio.app/assets/img/header-image.jpg",
|
| 69 |
+
label="Image",
|
| 70 |
+
).style(height=320)
|
| 71 |
with gr.Row():
|
| 72 |
go_btn = gr.Button("Go", label="Primary Button", variant="primary")
|
| 73 |
clear_btn = gr.Button(
|
| 74 |
"Clear", label="Secondary Button", variant="secondary"
|
| 75 |
)
|
| 76 |
|
| 77 |
+
Commented out the function that returns an image
|
| 78 |
+
def go(*args):
|
| 79 |
+
time.sleep(3)
|
| 80 |
+
return "https://gradio.app/assets/img/header-image.jpg"#"https://i.ibb.co/0rfK9Wm/light-miku-faded.webp"
|
| 81 |
|
| 82 |
+
go_btn.click(go, [radio, drop, drop_2, check, name], img, api_name="go")
|
| 83 |
|
| 84 |
+
Commented out the function that clears the image
|
| 85 |
+
def clear():
|
| 86 |
+
time.sleep(0.2)
|
| 87 |
+
return None
|
| 88 |
|
| 89 |
+
clear_btn.click(clear, None, img)
|
| 90 |
|
| 91 |
with gr.Row():
|
| 92 |
btn1 = gr.Button("Button 1").style(size="sm")
|