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)