File size: 989 Bytes
bf3219e 15a59d8 bf3219e 15a59d8 4ac04b5 15a59d8 bf3219e 15a59d8 4ac04b5 15a59d8 bf3219e 15a59d8 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
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() |