Spaces:
Running on Zero
Running on Zero
Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
"""VERIS Classifier - Gradio Web Application.
|
| 2 |
|
| 3 |
Dual-mode inference:
|
| 4 |
-
- Primary: Fine-tuned
|
| 5 |
- Fallback: OpenAI API (user provides their own key)
|
| 6 |
"""
|
| 7 |
|
|
@@ -436,7 +436,7 @@ def build_app() -> gr.Blocks:
|
|
| 436 |
<div class="hero-badges">
|
| 437 |
<span class="hero-badge">
|
| 438 |
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="#60a5fa" stroke-width="2"><path d="M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5"/></svg>
|
| 439 |
-
Fine-tuned
|
| 440 |
</span>
|
| 441 |
<span class="hero-badge">
|
| 442 |
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="#a78bfa" stroke-width="2"><circle cx="12" cy="12" r="10"/><path d="M12 6v6l4 2"/></svg>
|
|
@@ -483,7 +483,7 @@ def build_app() -> gr.Blocks:
|
|
| 483 |
</svg>
|
| 484 |
<span>
|
| 485 |
<strong>Model:</strong> Fine-tuned
|
| 486 |
-
<a href="https://huggingface.co/vibesecurityguy/veris-classifier-
|
| 487 |
on ZeroGPU — no API key needed!
|
| 488 |
</span>
|
| 489 |
</div>
|
|
@@ -648,7 +648,7 @@ def build_app() -> gr.Blocks:
|
|
| 648 |
<div class="about-card">
|
| 649 |
<h3 style="color: #f1f5f9; margin-top: 0;">About This Project</h3>
|
| 650 |
<p style="color: #94a3b8; line-height: 1.7;">
|
| 651 |
-
This classifier uses a <strong style="color: #e2e8f0;">fine-tuned
|
| 652 |
trained on <strong style="color: #e2e8f0;">10,000+ real security incidents</strong> from the
|
| 653 |
<a href="https://github.com/vz-risk/VCDB" target="_blank" style="color: #60a5fa;">VERIS Community Database (VCDB)</a>
|
| 654 |
plus 300+ VERIS Q&A pairs. The model was fine-tuned using QLoRA (4-bit quantization)
|
|
@@ -658,7 +658,7 @@ def build_app() -> gr.Blocks:
|
|
| 658 |
<a href="https://verisframework.org/" target="_blank" style="display: inline-flex; align-items: center; gap: 6px; background: rgba(59, 130, 246, 0.1); border: 1px solid rgba(59, 130, 246, 0.3); border-radius: 8px; padding: 8px 16px; color: #60a5fa; text-decoration: none; font-size: 0.9rem;">VERIS Framework</a>
|
| 659 |
<a href="https://github.com/vz-risk/VCDB" target="_blank" style="display: inline-flex; align-items: center; gap: 6px; background: rgba(139, 92, 246, 0.1); border: 1px solid rgba(139, 92, 246, 0.3); border-radius: 8px; padding: 8px 16px; color: #a78bfa; text-decoration: none; font-size: 0.9rem;">VCDB GitHub</a>
|
| 660 |
<a href="https://www.verizon.com/business/resources/reports/dbir/" target="_blank" style="display: inline-flex; align-items: center; gap: 6px; background: rgba(52, 211, 153, 0.1); border: 1px solid rgba(52, 211, 153, 0.3); border-radius: 8px; padding: 8px 16px; color: #34d399; text-decoration: none; font-size: 0.9rem;">Verizon DBIR</a>
|
| 661 |
-
<a href="https://huggingface.co/vibesecurityguy/veris-classifier-
|
| 662 |
</div>
|
| 663 |
</div>
|
| 664 |
|
|
@@ -668,7 +668,7 @@ def build_app() -> gr.Blocks:
|
|
| 668 |
<tbody>
|
| 669 |
<tr style="border-bottom: 1px solid #1e293b;">
|
| 670 |
<td style="padding: 10px 16px; color: #94a3b8; width: 40%;">Base Model</td>
|
| 671 |
-
<td style="padding: 10px 16px; color: #e2e8f0;">
|
| 672 |
</tr>
|
| 673 |
<tr style="border-bottom: 1px solid #1e293b;">
|
| 674 |
<td style="padding: 10px 16px; color: #94a3b8;">Fine-tuning Method</td>
|
|
@@ -698,10 +698,10 @@ def build_app() -> gr.Blocks:
|
|
| 698 |
# --- Footer ---
|
| 699 |
gr.HTML("""
|
| 700 |
<div class="footer">
|
| 701 |
-
Fine-tuned
|
| 702 |
<br>
|
| 703 |
<a href="https://github.com/pshamoon/veris-classifier">Source Code</a> ·
|
| 704 |
-
<a href="https://huggingface.co/vibesecurityguy/veris-classifier-
|
| 705 |
<a href="https://verisframework.org/">VERIS Docs</a> ·
|
| 706 |
<a href="https://github.com/vz-risk/VCDB">VCDB</a>
|
| 707 |
</div>
|
|
|
|
| 1 |
"""VERIS Classifier - Gradio Web Application.
|
| 2 |
|
| 3 |
Dual-mode inference:
|
| 4 |
+
- Primary: Fine-tuned Mistral-7B-Instruct on ZeroGPU (no API key needed)
|
| 5 |
- Fallback: OpenAI API (user provides their own key)
|
| 6 |
"""
|
| 7 |
|
|
|
|
| 436 |
<div class="hero-badges">
|
| 437 |
<span class="hero-badge">
|
| 438 |
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="#60a5fa" stroke-width="2"><path d="M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5"/></svg>
|
| 439 |
+
Fine-tuned Mistral-7B
|
| 440 |
</span>
|
| 441 |
<span class="hero-badge">
|
| 442 |
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="#a78bfa" stroke-width="2"><circle cx="12" cy="12" r="10"/><path d="M12 6v6l4 2"/></svg>
|
|
|
|
| 483 |
</svg>
|
| 484 |
<span>
|
| 485 |
<strong>Model:</strong> Fine-tuned
|
| 486 |
+
<a href="https://huggingface.co/vibesecurityguy/veris-classifier-v2" target="_blank" style="color: #34d399;">Mistral-7B-Instruct</a>
|
| 487 |
on ZeroGPU — no API key needed!
|
| 488 |
</span>
|
| 489 |
</div>
|
|
|
|
| 648 |
<div class="about-card">
|
| 649 |
<h3 style="color: #f1f5f9; margin-top: 0;">About This Project</h3>
|
| 650 |
<p style="color: #94a3b8; line-height: 1.7;">
|
| 651 |
+
This classifier uses a <strong style="color: #e2e8f0;">fine-tuned Mistral-7B-Instruct</strong> model,
|
| 652 |
trained on <strong style="color: #e2e8f0;">10,000+ real security incidents</strong> from the
|
| 653 |
<a href="https://github.com/vz-risk/VCDB" target="_blank" style="color: #60a5fa;">VERIS Community Database (VCDB)</a>
|
| 654 |
plus 300+ VERIS Q&A pairs. The model was fine-tuned using QLoRA (4-bit quantization)
|
|
|
|
| 658 |
<a href="https://verisframework.org/" target="_blank" style="display: inline-flex; align-items: center; gap: 6px; background: rgba(59, 130, 246, 0.1); border: 1px solid rgba(59, 130, 246, 0.3); border-radius: 8px; padding: 8px 16px; color: #60a5fa; text-decoration: none; font-size: 0.9rem;">VERIS Framework</a>
|
| 659 |
<a href="https://github.com/vz-risk/VCDB" target="_blank" style="display: inline-flex; align-items: center; gap: 6px; background: rgba(139, 92, 246, 0.1); border: 1px solid rgba(139, 92, 246, 0.3); border-radius: 8px; padding: 8px 16px; color: #a78bfa; text-decoration: none; font-size: 0.9rem;">VCDB GitHub</a>
|
| 660 |
<a href="https://www.verizon.com/business/resources/reports/dbir/" target="_blank" style="display: inline-flex; align-items: center; gap: 6px; background: rgba(52, 211, 153, 0.1); border: 1px solid rgba(52, 211, 153, 0.3); border-radius: 8px; padding: 8px 16px; color: #34d399; text-decoration: none; font-size: 0.9rem;">Verizon DBIR</a>
|
| 661 |
+
<a href="https://huggingface.co/vibesecurityguy/veris-classifier-v2" target="_blank" style="display: inline-flex; align-items: center; gap: 6px; background: rgba(251, 191, 36, 0.1); border: 1px solid rgba(251, 191, 36, 0.3); border-radius: 8px; padding: 8px 16px; color: #fbbf24; text-decoration: none; font-size: 0.9rem;">Model on HF</a>
|
| 662 |
</div>
|
| 663 |
</div>
|
| 664 |
|
|
|
|
| 668 |
<tbody>
|
| 669 |
<tr style="border-bottom: 1px solid #1e293b;">
|
| 670 |
<td style="padding: 10px 16px; color: #94a3b8; width: 40%;">Base Model</td>
|
| 671 |
+
<td style="padding: 10px 16px; color: #e2e8f0;">mistralai/Mistral-7B-Instruct-v0.3</td>
|
| 672 |
</tr>
|
| 673 |
<tr style="border-bottom: 1px solid #1e293b;">
|
| 674 |
<td style="padding: 10px 16px; color: #94a3b8;">Fine-tuning Method</td>
|
|
|
|
| 698 |
# --- Footer ---
|
| 699 |
gr.HTML("""
|
| 700 |
<div class="footer">
|
| 701 |
+
Fine-tuned Mistral-7B-Instruct · VERIS Framework · VCDB · QLoRA
|
| 702 |
<br>
|
| 703 |
<a href="https://github.com/pshamoon/veris-classifier">Source Code</a> ·
|
| 704 |
+
<a href="https://huggingface.co/vibesecurityguy/veris-classifier-v2">Model</a> ·
|
| 705 |
<a href="https://verisframework.org/">VERIS Docs</a> ·
|
| 706 |
<a href="https://github.com/vz-risk/VCDB">VCDB</a>
|
| 707 |
</div>
|