bug-fixer / app_ui.py
venky2k1
Upgraded to CodeT5 for full code bug fixing
22b22ed
raw
history blame contribute delete
576 Bytes
import gradio as gr
from full_code_fixer import fix_code
def fix_script(code):
fixed = fix_code(code)
return "Analyzed", fixed
with gr.Blocks() as demo:
gr.Markdown("## 🛠️ Bug Detection and Fixing Tool - Full Script Version")
code_input = gr.Textbox(lines=20, label="Paste Your Python Code Here")
bug_status = gr.Textbox(label="Status")
fixed_code = gr.Textbox(lines=20, label="Suggested Fix")
gr.Button("Detect and Fix").click(fix_script, inputs=code_input, outputs=[bug_status, fixed_code])
demo.launch()
#for the gradio user interface