Omnibus commited on
Commit
19884ac
·
1 Parent(s): aa641c2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -2,7 +2,7 @@ import gradio as gr
2
  import qrcode as qr
3
 
4
 
5
- def make_qr(txt,fill="black",back="white"):
6
  out = f'{txt}'
7
  qrm = qr.QRCode()
8
  qrm.add_data(out)
@@ -13,7 +13,10 @@ def make_qr(txt,fill="black",back="white"):
13
 
14
  with gr.Blocks() as app:
15
  inp=gr.Textbox()
 
 
 
16
  go_btn=gr.Button()
17
  outp=gr.Image()
18
- go_btn.click(make_qr,inp,outp)
19
  app.queue(concurrency_count=10).launch()
 
2
  import qrcode as qr
3
 
4
 
5
+ def make_qr(txt,fill,back):
6
  out = f'{txt}'
7
  qrm = qr.QRCode()
8
  qrm.add_data(out)
 
13
 
14
  with gr.Blocks() as app:
15
  inp=gr.Textbox()
16
+ with gr.Row():
17
+ fill=gr.ColorPicker(value="black")
18
+ back=gr.ColorPicker(value="white")
19
  go_btn=gr.Button()
20
  outp=gr.Image()
21
+ go_btn.click(make_qr,[inp,fill,back],outp)
22
  app.queue(concurrency_count=10).launch()