File size: 785 Bytes
9f88cc8
ed5ce46
 
 
 
 
 
 
 
9f88cc8
 
 
ed5ce46
 
 
 
 
 
 
 
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 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)