From c0e8c7938ff52fa8c3ed4dc6f9079228a75bd345 Mon Sep 17 00:00:00 2001 From: Raghuram Subramani <raghus2247@gmail.com> Date: Mon, 07 Apr 2025 07:12:53 +0000 Subject: [PATCH] remove comment --- heinous_offences/app.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/heinous_offences/app.py b/heinous_offences/app.py index 7cec2bd..6d20b1d 100644 --- a/heinous_offences/app.py +++ a/heinous_offences/app.py @@ -34,14 +34,13 @@ results = table.search(crime_query.section == str(section)) if not results: - return f"No record found for section {section} under {name_from_key.get(act_key)}.", "", "", "" + return f"No record found for section {section} under {act_key}.", "", "", "" offence = results[0] return [ f"## Severity: {offence.get('severity', 'N/A')}", f"{offence.get('section_text', 'N/A')}", - f"### Minimum Punishment: {offence.get('minimum_punishment', 'N/A')}", - f"Comments: {offence.get('comment', 'N/A')}" + f"### Minimum Punishment: {offence.get('minimum_punishment', 'N/A')}" ] gradio_ui = gr.Blocks() @@ -56,12 +55,11 @@ severity = gr.Markdown() section_text = gr.Markdown() punishment = gr.Markdown() - comment = gr.Markdown() submit_btn.click( fn=lookup_crime, inputs=[section_input, act_dropdown], - outputs=[severity, section_text, punishment, comment] + outputs=[severity, section_text, punishment] ) # ---------- FastAPI Logic ---------- @@ -122,14 +120,13 @@ reader = csv.reader(f) next(reader) for row in reader: - if len(row) < 5: + if len(row) < 4: continue table.insert({ "section": row[0], "section_text": row[1], "minimum_punishment": row[2], - "severity": row[3], - "comment": row[4], + "severity": row[3] }) return RedirectResponse("/admin", status_code=303) -- rgit 0.1.5