Spaces:
Running
Running
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 | |