Siddhanta19 commited on
Commit
af8be4b
1 Parent(s): 755c0b3

Update app.py

Browse files

bugfix, I'm dumb

Files changed (1) hide show
  1. app.py +16 -15
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
- # Commented out the image
66
- # img = gr.Image(
67
- # "https://i.ibb.co/F4hKFrZ/dark-miku.webp",
68
- # label="Image",
69
- # ).style(height=320)
 
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
- # Commented out the function that returns an image
77
- # def go(*args):
78
- # time.sleep(3)
79
- # return "https://i.ibb.co/0rfK9Wm/light-miku-faded.webp"
80
 
81
- # go_btn.click(go, [radio, drop, drop_2, check, name], img, api_name="go")
82
 
83
- # Commented out the function that clears the image
84
- # def clear():
85
- # time.sleep(0.2)
86
- # return None
87
 
88
- # clear_btn.click(clear, None, img)
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")