import gradio as gr from models.codet5 import CodeT5 from models.other_models import OtherModels from repositories.github_api import GitHubAPI codet5_model = CodeT5() other_models = OtherModels() github_api = GitHubAPI() def analyze_repository(repo_url): repo_data = github_api.get_repository(repo_url) optimization_results = codet5_model.analyze(repo_data, github_api) bug_hunting_results = other_models.analyze(repo_data, github_api) return optimization_results, bug_hunting_results iface = gr.Interface( fn=analyze_repository, inputs=gr.Textbox(lines=1, placeholder="Enter GitHub Repository URL (e.g., https://github.com/owner/repo)"), outputs=[ gr.Textbox(lines=10, label="Optimization Results"), gr.Textbox(lines=10, label="Bug Hunting Results"), ], title="GitHub Repository Analyzer", description="Analyze GitHub repositories for optimization suggestions and potential bugs using CodeT5 and other models.", ) iface.launch()