Spaces:
Sleeping
Sleeping
File size: 472 Bytes
604278f 52de739 604278f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
import gradio as gr
import qrcode
def generate_wifi_qr(ssid, encryption, password):
wifi_data = f"WIFI:S:{ssid};T:{encryption};R:1;P:{password};;"
qr = qrcode.make(wifi_data)
return qr.get_image()
iface = gr.Interface(
fn=generate_wifi_qr,
inputs=[
gr.Textbox(label="SSID"),
gr.Dropdown(["WPA", "WEP"], label="Encryption"),
gr.Textbox(label="Password", type="password")
],
outputs="image"
)
iface.launch(debug=True)
|