Spaces:
Running
Running
File size: 576 Bytes
63fb23d 22b22ed 63fb23d 22b22ed 63fb23d 22b22ed 63fb23d 22b22ed 63fb23d 22b22ed d57024f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
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
|