Kvikontent commited on
Commit
c9b5358
·
1 Parent(s): 0128da0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -51,11 +51,11 @@ def generate_qrcode(url, color, gradient, gradient_colors, border_radius, logo):
51
  iface = gr.Interface(
52
  fn=generate_qrcode,
53
  inputs=[
54
- gr.inputs.Textbox(label="URL"),
55
- gr.ColorPicker(label="Color"),
56
- gr.inputs.Checkbox(label="Gradient"),
57
- gr.ColorPicker(label="Gradient Colors", n_colors=2),
58
- gr.inputs.Number(label="Border Radius"),
59
  gr.inputs.File(label="Logo")
60
  ],
61
  outputs="image",
@@ -63,9 +63,9 @@ iface = gr.Interface(
63
  description="Enter a URL and customize the QR code appearance",
64
  examples=[
65
  ["instagram.com", "#FF0000", True, ["#FF00FF", "#00FFFF"], 10, None],
66
- ["twitter.com", "#00FF00", False, [], 0, "logo.png"],
67
  ["huggingface.co", "#0000FF", True, ["#FF00FF", "#00FFFF"], 15, "logo.png"]
68
  ]
69
  )
70
 
71
- iface.launch()
 
51
  iface = gr.Interface(
52
  fn=generate_qrcode,
53
  inputs=[
54
+ gr.inputs.Textbox(label="URL", default="example.com"),
55
+ gr.ColorPicker(label="Color", default="#000000"),
56
+ gr.inputs.Checkbox(label="Gradient", default=False),
57
+ gr.ColorPicker(label="Gradient Colors", default=["#FFFFFF", "#000000"], nargs=2),
58
+ gr.inputs.Number(label="Border Radius", default=0),
59
  gr.inputs.File(label="Logo")
60
  ],
61
  outputs="image",
 
63
  description="Enter a URL and customize the QR code appearance",
64
  examples=[
65
  ["instagram.com", "#FF0000", True, ["#FF00FF", "#00FFFF"], 10, None],
66
+ ["twitter.com", "#00FF00", False, ["#FFFFFF", "#000000"], 0, "logo.png"],
67
  ["huggingface.co", "#0000FF", True, ["#FF00FF", "#00FFFF"], 15, "logo.png"]
68
  ]
69
  )
70
 
71
+ iface.launch()