import gradio as gr def guest_signup(name, phone, otp_phone, email, otp_email, profile_pic, family_pic, password): return f"Guest {name} signed up successfully!" def guest_login(name, password): return f"Guest {name} logged in successfully!" def groom_signup(name, email, otp_email, phone, otp_phone, e_card, password): return f"Groom {name} signed up successfully!" def groom_login(name, password, two_factor): return f"Groom {name} logged in successfully!" def photographer_signup(name, email, otp_email, phone, otp_phone, password): return f"Photographer {name} signed up successfully!" def photographer_login(email, password, two_factor): return f"Photographer {email} logged in successfully!" def guest_dashboard(): return "Guest Dashboard: View and manage your photos." def groom_dashboard(): return "Groom Dashboard: Manage public gallery and approve requests." def photographer_dashboard(): return "Photographer Dashboard: Upload and manage photos." with gr.Blocks() as app: gr.Markdown("# Wedding Media Management System") with gr.Tab("Guest Signup"): name = gr.Textbox(label="Name") phone = gr.Textbox(label="Phone Number") otp_phone = gr.Textbox(label="OTP Verification (Phone)") email = gr.Textbox(label="Email") otp_email = gr.Textbox(label="OTP Verification (Email)") profile_pic = gr.File(label="Upload Profile Picture") family_pic = gr.File(label="Upload Family Picture (Optional)") password = gr.Textbox(label="Password", type="password") submit = gr.Button("Submit") output = gr.Textbox() submit.click(guest_signup, inputs=[name, phone, otp_phone, email, otp_email, profile_pic, family_pic, password], outputs=output) with gr.Tab("Guest Login"): name = gr.Textbox(label="Name") password = gr.Textbox(label="Password", type="password") login_btn = gr.Button("Login") output = gr.Textbox() login_btn.click(guest_login, inputs=[name, password], outputs=output) with gr.Tab("Groom Signup"): name = gr.Textbox(label="Name") email = gr.Textbox(label="Email") otp_email = gr.Textbox(label="OTP Verification (Email)") phone = gr.Textbox(label="Phone Number") otp_phone = gr.Textbox(label="OTP Verification (Phone)") e_card = gr.File(label="Upload E-Card") password = gr.Textbox(label="Password", type="password") submit = gr.Button("Submit") output = gr.Textbox() submit.click(groom_signup, inputs=[name, email, otp_email, phone, otp_phone, e_card, password], outputs=output) with gr.Tab("Groom Login"): name = gr.Textbox(label="Name") password = gr.Textbox(label="Password", type="password") two_factor = gr.Textbox(label="Two-step authenticator") login_btn = gr.Button("Login") output = gr.Textbox() login_btn.click(groom_login, inputs=[name, password, two_factor], outputs=output) with gr.Tab("Photographer Signup"): name = gr.Textbox(label="Name") email = gr.Textbox(label="Email") otp_email = gr.Textbox(label="OTP Verification (Email)") phone = gr.Textbox(label="Phone Number") otp_phone = gr.Textbox(label="OTP Verification (Phone)") password = gr.Textbox(label="Password", type="password") submit = gr.Button("Submit") output = gr.Textbox() submit.click(photographer_signup, inputs=[name, email, otp_email, phone, otp_phone, password], outputs=output) with gr.Tab("Photographer Login"): email = gr.Textbox(label="Email") password = gr.Textbox(label="Password", type="password") two_factor = gr.Textbox(label="Two-step authenticator") login_btn = gr.Button("Login") output = gr.Textbox() login_btn.click(photographer_login, inputs=[email, password, two_factor], outputs=output) with gr.Tab("Guest Dashboard"): dashboard_btn = gr.Button("View Guest Dashboard") output = gr.Textbox() dashboard_btn.click(guest_dashboard, outputs=output) with gr.Tab("Groom Dashboard"): dashboard_btn = gr.Button("View Groom Dashboard") output = gr.Textbox() dashboard_btn.click(groom_dashboard, outputs=output) with gr.Tab("Photographer Dashboard"): dashboard_btn = gr.Button("View Photographer Dashboard") output = gr.Textbox() dashboard_btn.click(photographer_dashboard, outputs=output) app.launch()