Spaces:
Runtime error
Runtime error
import gradio as gr | |
from bug_detector import detect_bug | |
from fix_generator import generate_fix | |
def bug_fixer(code): | |
bug_status = detect_bug(code) | |
fixed_code = generate_fix(code) | |
return bug_status, fixed_code | |
title = "\ud83d\udd27 Bug Detection and Fixing Tool" | |
with gr.Blocks(theme=gr.themes.Soft()) as demo: | |
gr.Markdown(""" | |
# \ud83d\udd27 Bug Detection and Fixing Tool | |
**Final Year Project - Guided by: Prof. Alakananda K P** | |
**Team: Akanksha K P and Divyashree N** | |
""") | |
code_input = gr.Textbox(lines=8, label="Enter Buggy Code") | |
bug_output = gr.Textbox(label="Detected Bug") | |
fix_output = gr.Textbox(label="Suggested Fix") | |
btn = gr.Button("Detect and Fix") | |
btn.click(fn=bug_fixer, inputs=code_input, outputs=[bug_output, fix_output]) | |
demo.launch() | |
#for the gradio user interface | |