Spaces:
Sleeping
Sleeping
final cosmetic changes
Browse files
app.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
|
| 2 |
"""CVE Dashboard - Real-time vulnerability monitoring with NVD API and LLM-powered audience customization."""
|
| 3 |
|
| 4 |
import os
|
|
@@ -389,7 +389,7 @@ def generate_tailored_summary(cve_description: str, audience: str, hf_token: Opt
|
|
| 389 |
profile = AUDIENCE_PROFILES[audience]
|
| 390 |
|
| 391 |
# Gemma uses a specific chat template format.
|
| 392 |
-
#
|
| 393 |
full_prompt = f"""You are an expert cybersecurity analyst.
|
| 394 |
|
| 395 |
Rewrite this CVE description for a {audience}.
|
|
@@ -587,7 +587,7 @@ def create_interface():
|
|
| 587 |
"""
|
| 588 |
### About this Dashboard
|
| 589 |
|
| 590 |
-
This dashboard provides real-time monitoring of Common Vulnerabilities and Exposures (CVEs)
|
| 591 |
from the NIST National Vulnerability Database with AI-powered audience customization.
|
| 592 |
|
| 593 |
**Features:**
|
|
@@ -595,6 +595,12 @@ def create_interface():
|
|
| 595 |
- Filter by severity levels
|
| 596 |
- Visualize CVE distributions and trends
|
| 597 |
- AI-powered audience-specific summaries using the google/gemma-2-2b-it model.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 598 |
|
| 599 |
**Supported Audiences:**
|
| 600 |
- **Cybersecurity Professional:** Focus on threats, attack vectors, and mitigation
|
|
@@ -610,21 +616,12 @@ def create_interface():
|
|
| 610 |
|
| 611 |
**Disclaimer:** Generated content may be inaccurate or false.
|
| 612 |
|
| 613 |
-
The free community tier of the Hugging Face Inference API powers this app's AI features.
|
| 614 |
-
|
| 615 |
-
**Performance Optimizations:**
|
| 616 |
-
- Shorter timeouts for faster failure detection
|
| 617 |
-
- Optimized prompts for quicker responses
|
| 618 |
|
| 619 |
-
**
|
| 620 |
-
|
| 621 |
-
|
| 622 |
-
|
| 623 |
-
**Severity Levels:**
|
| 624 |
-
- **CRITICAL** (9.0-10.0): Complete system compromise possible
|
| 625 |
-
- **HIGH** (7.0-8.9): Significant impact, immediate patching recommended
|
| 626 |
-
- **MEDIUM** (4.0-6.9): Moderate impact, plan for updates
|
| 627 |
-
- **LOW** (0.1-3.9): Minor impact, update in regular cycle
|
| 628 |
"""
|
| 629 |
)
|
| 630 |
|
|
|
|
| 1 |
+
|
| 2 |
"""CVE Dashboard - Real-time vulnerability monitoring with NVD API and LLM-powered audience customization."""
|
| 3 |
|
| 4 |
import os
|
|
|
|
| 389 |
profile = AUDIENCE_PROFILES[audience]
|
| 390 |
|
| 391 |
# Gemma uses a specific chat template format.
|
| 392 |
+
# Combine the system and user prompts into a single user turn.
|
| 393 |
full_prompt = f"""You are an expert cybersecurity analyst.
|
| 394 |
|
| 395 |
Rewrite this CVE description for a {audience}.
|
|
|
|
| 587 |
"""
|
| 588 |
### About this Dashboard
|
| 589 |
|
| 590 |
+
This dashboard provides real-time monitoring of [Common Vulnerabilities and Exposures (CVEs)](https://en.wikipedia.org/wiki/Common_Vulnerabilities_and_Exposures)
|
| 591 |
from the NIST National Vulnerability Database with AI-powered audience customization.
|
| 592 |
|
| 593 |
**Features:**
|
|
|
|
| 595 |
- Filter by severity levels
|
| 596 |
- Visualize CVE distributions and trends
|
| 597 |
- AI-powered audience-specific summaries using the google/gemma-2-2b-it model.
|
| 598 |
+
|
| 599 |
+
**Severity Levels:**
|
| 600 |
+
- **CRITICAL** (9.0-10.0): Complete system compromise possible
|
| 601 |
+
- **HIGH** (7.0-8.9): Significant impact, immediate patching recommended
|
| 602 |
+
- **MEDIUM** (4.0-6.9): Moderate impact, plan for updates
|
| 603 |
+
- **LOW** (0.1-3.9): Minor impact, update in regular cycle
|
| 604 |
|
| 605 |
**Supported Audiences:**
|
| 606 |
- **Cybersecurity Professional:** Focus on threats, attack vectors, and mitigation
|
|
|
|
| 616 |
|
| 617 |
**Disclaimer:** Generated content may be inaccurate or false.
|
| 618 |
|
| 619 |
+
The free community tier of the Hugging Face Inference API powers this app's AI features.
|
| 620 |
+
Since computing resources are shared, anticipate some delay on your initial request as the model loads. Later requests usually process more quickly.
|
|
|
|
|
|
|
|
|
|
| 621 |
|
| 622 |
+
**Note:** If you encounter rate limiting or timeouts, please try again after a short wait.
|
| 623 |
+
|
| 624 |
+
**Developed by** [M. Murat Ardag](https://mmuratardag.github.io/).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 625 |
"""
|
| 626 |
)
|
| 627 |
|