Update app.py
Browse files
app.py
CHANGED
@@ -32,13 +32,13 @@ def predict_cwe(commit_message: str):
|
|
32 |
# Gradio UI
|
33 |
demo = gr.Interface(
|
34 |
fn=predict_cwe,
|
35 |
-
inputs=gr.Textbox(lines=3, placeholder="Enter your commit message here..."),
|
36 |
outputs=gr.Label(num_top_classes=5),
|
37 |
-
title="CWE Prediction from Commit Message",
|
38 |
-
description="This tool uses a fine-tuned model to predict CWE categories from Git commit messages. "
|
39 |
"Predicted child CWEs are mapped to their parent CWEs if applicable.",
|
40 |
examples=[
|
41 |
-
["
|
42 |
["SQL injection possible in login flow"],
|
43 |
["Improved input validation to prevent XSS"],
|
44 |
["Added try/catch to avoid null pointer crash"],
|
|
|
32 |
# Gradio UI
|
33 |
demo = gr.Interface(
|
34 |
fn=predict_cwe,
|
35 |
+
inputs=gr.Textbox(lines=3, placeholder="Enter your commit message or vulnerability description here..."),
|
36 |
outputs=gr.Label(num_top_classes=5),
|
37 |
+
title="CWE Prediction from Commit Message or Vulnerability Description",
|
38 |
+
description="This tool uses a fine-tuned model to predict CWE categories from Git commit messages and vulnerability descriptions. "
|
39 |
"Predicted child CWEs are mapped to their parent CWEs if applicable.",
|
40 |
examples=[
|
41 |
+
["A vulnerability has been found in cfire24 ajaxlife up to 0.3.2 and classified as problematic. This vulnerability affects unknown code. The manipulation leads to cross site scripting. The attack can be initiated remotely. Upgrading to version 0.3.3 is able to address this issue. "],
|
42 |
["SQL injection possible in login flow"],
|
43 |
["Improved input validation to prevent XSS"],
|
44 |
["Added try/catch to avoid null pointer crash"],
|