From 41b49aa185c5d4d51fbeed55e280aabf9f1f5ab5 Mon Sep 17 00:00:00 2001 From: Raghuram Subramani <raghus2247@gmail.com> Date: Mon, 07 Apr 2025 07:18:56 +0000 Subject: [PATCH] remove comment --- heinous_offences/app.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/heinous_offences/app.py b/heinous_offences/app.py index 6d20b1d..83850b8 100644 --- a/heinous_offences/app.py +++ a/heinous_offences/app.py @@ -27,14 +27,11 @@ # ---------- Gradio Logic ---------- def lookup_crime(section, act_key): - if section <= 0: - return "Please enter a valid section number.", "", "", "" - table = db.table(key_from_name[act_key]) - results = table.search(crime_query.section == str(section)) + results = table.search(crime_query.section == section) if not results: - return f"No record found for section {section} under {act_key}.", "", "", "" + return f"No record found for section {section} under {act_key}.", "", "" offence = results[0] return [ @@ -48,7 +45,7 @@ gr.Markdown("## Heinous Crime Lookup Tool") with gr.Row(): - section_input = gr.Number(label="Enter Section Number", value=0) + section_input = gr.Text(label="Enter Section Number") act_dropdown = gr.Dropdown(choices=list(name_from_key.values()), label="Select Act") submit_btn = gr.Button("Lookup") -- rgit 0.1.5