Mr00Magician commited on
Commit
10d327e
1 Parent(s): 9b018d8

added main file

Browse files
Files changed (1) hide show
  1. app.py +15 -0
app.py ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import segno.helpers as hp
2
+ import gradio as gr
3
+ from PIL import Image
4
+
5
+ def qr_code_generator(ssid, password = None):
6
+ qr_code = hp.make_wifi(ssid = ssid, password = password, security = 'WPA')
7
+ qr_code.save('temp.png', scale = 10)
8
+ Im = Image.open('temp.png')
9
+ return Im
10
+
11
+ iface = gr.Interface(fn=qr_code_generator,
12
+ inputs = [gr.inputs.Textbox(label = 'SSID'), gr.inputs.Textbox(label = 'Password')],
13
+ outputs = 'image', allow_flagging = False)
14
+
15
+ iface.launch()