Abid Ali Awan
commited on
Commit
Β·
a91847b
1
Parent(s):
ff1fa38
Refactor Gradio interface: reduce input/output textbox lines from 20 to 10, and update tab titles with emojis for better user experience.
Browse files- src/app.py +5 -5
src/app.py
CHANGED
@@ -10,14 +10,14 @@ load_dotenv()
|
|
10 |
# Create Gradio interfaces for code analysis
|
11 |
analysis_report_demo = gr.Interface(
|
12 |
fn=code_analysis_report,
|
13 |
-
inputs=gr.Textbox(label="Enter Code Here", lines=
|
14 |
-
outputs=gr.Textbox(label="Analysis Report", lines=
|
15 |
description="Generate a detailed code analysis report with top fixes. Please read the [documentation](https://huggingface.co/spaces/Agents-MCP-Hackathon/code-analysis-mcp/blob/main/README.md) for more details.",
|
16 |
)
|
17 |
|
18 |
code_score_demo = gr.Interface(
|
19 |
fn=code_analysis_score,
|
20 |
-
inputs=gr.Textbox(label="Enter Code Here", lines=
|
21 |
outputs=gr.JSON(label="Code Score"),
|
22 |
description="Generate a vulnerability, style, and quality code score. Please read the [documentation](https://huggingface.co/spaces/Agents-MCP-Hackathon/code-analysis-mcp/blob/main/README.md) for more details.",
|
23 |
)
|
@@ -25,8 +25,8 @@ code_score_demo = gr.Interface(
|
|
25 |
# Create tabbed interface
|
26 |
demo = gr.TabbedInterface(
|
27 |
[analysis_report_demo, code_score_demo],
|
28 |
-
["Code Analysis
|
29 |
-
title="Code Scoring & Analysis MCP Server",
|
30 |
theme=gr.themes.Soft(),
|
31 |
)
|
32 |
|
|
|
10 |
# Create Gradio interfaces for code analysis
|
11 |
analysis_report_demo = gr.Interface(
|
12 |
fn=code_analysis_report,
|
13 |
+
inputs=gr.Textbox(label="Enter Code Here", lines=10),
|
14 |
+
outputs=gr.Textbox(label="Analysis Report", lines=10),
|
15 |
description="Generate a detailed code analysis report with top fixes. Please read the [documentation](https://huggingface.co/spaces/Agents-MCP-Hackathon/code-analysis-mcp/blob/main/README.md) for more details.",
|
16 |
)
|
17 |
|
18 |
code_score_demo = gr.Interface(
|
19 |
fn=code_analysis_score,
|
20 |
+
inputs=gr.Textbox(label="Enter Code Here", lines=10),
|
21 |
outputs=gr.JSON(label="Code Score"),
|
22 |
description="Generate a vulnerability, style, and quality code score. Please read the [documentation](https://huggingface.co/spaces/Agents-MCP-Hackathon/code-analysis-mcp/blob/main/README.md) for more details.",
|
23 |
)
|
|
|
25 |
# Create tabbed interface
|
26 |
demo = gr.TabbedInterface(
|
27 |
[analysis_report_demo, code_score_demo],
|
28 |
+
["π§Code Analysis", "π―Code Score"],
|
29 |
+
title="π§βπ»Code Scoring & Analysis MCP Server",
|
30 |
theme=gr.themes.Soft(),
|
31 |
)
|
32 |
|