Spaces:
Sleeping
Sleeping
| import gradio as gr | |
| import ethics_audit | |
| pet_reports = [] | |
| def submit_pet(pet_type, name, desc, location): | |
| pet_reports.append({"Type": pet_type, "Name": name, "Description": desc, "Location": location}) | |
| ethics_audit.log_event(f"New pet report submitted: {name}") | |
| return "Report submitted successfully." | |
| def render(online): | |
| with gr.Column(): | |
| gr.Markdown("### Report Lost/Found Pet") | |
| pet_type = gr.Radio(["Lost", "Found"], label="Type") | |
| name = gr.Textbox(label="Pet Name") | |
| desc = gr.Textbox(label="Description") | |
| location = gr.Textbox(label="Location Last Seen") | |
| out = gr.Textbox(interactive=False) | |
| btn = gr.Button("Submit Report") | |
| btn.click(submit_pet, inputs=[pet_type, name, desc, location], outputs=out) |