Spaces:
Running
Running
Add 3 files
Browse files- README.md +6 -4
- index.html +252 -19
- prompts.txt +1 -0
README.md
CHANGED
@@ -1,10 +1,12 @@
|
|
1 |
---
|
2 |
-
title:
|
3 |
-
emoji:
|
4 |
-
colorFrom:
|
5 |
colorTo: green
|
6 |
sdk: static
|
7 |
pinned: false
|
|
|
|
|
8 |
---
|
9 |
|
10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
1 |
---
|
2 |
+
title: rabbit-redux-new
|
3 |
+
emoji: π³
|
4 |
+
colorFrom: purple
|
5 |
colorTo: green
|
6 |
sdk: static
|
7 |
pinned: false
|
8 |
+
tags:
|
9 |
+
- deepsite
|
10 |
---
|
11 |
|
12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.html
CHANGED
@@ -1,19 +1,252 @@
|
|
1 |
-
<!
|
2 |
-
<html>
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html lang="en">
|
3 |
+
<head>
|
4 |
+
<meta charset="UTF-8">
|
5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
+
<title>RabbitRedux Code Classifier</title>
|
7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
8 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
9 |
+
<style>
|
10 |
+
.gradient-bg {
|
11 |
+
background: linear-gradient(135deg, #6e8efb 0%, #a777e3 100%);
|
12 |
+
}
|
13 |
+
.code-input {
|
14 |
+
font-family: 'Courier New', monospace;
|
15 |
+
min-height: 200px;
|
16 |
+
}
|
17 |
+
.result-card {
|
18 |
+
transition: all 0.3s ease;
|
19 |
+
}
|
20 |
+
.result-card:hover {
|
21 |
+
transform: translateY(-5px);
|
22 |
+
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
|
23 |
+
}
|
24 |
+
.language-tag {
|
25 |
+
animation: pulse 2s infinite;
|
26 |
+
}
|
27 |
+
@keyframes pulse {
|
28 |
+
0% { opacity: 0.8; }
|
29 |
+
50% { opacity: 1; }
|
30 |
+
100% { opacity: 0.8; }
|
31 |
+
}
|
32 |
+
</style>
|
33 |
+
</head>
|
34 |
+
<body class="bg-gray-50">
|
35 |
+
<header class="gradient-bg text-white shadow-lg">
|
36 |
+
<div class="container mx-auto px-4 py-8">
|
37 |
+
<div class="flex items-center justify-between">
|
38 |
+
<div class="flex items-center space-x-3">
|
39 |
+
<i class="fas fa-code text-3xl"></i>
|
40 |
+
<h1 class="text-3xl font-bold">RabbitRedux</h1>
|
41 |
+
</div>
|
42 |
+
<div class="hidden md:flex space-x-6">
|
43 |
+
<a href="#" class="hover:text-gray-200 transition">Features</a>
|
44 |
+
<a href="#" class="hover:text-gray-200 transition">Documentation</a>
|
45 |
+
<a href="#" class="hover:text-gray-200 transition">API</a>
|
46 |
+
<a href="#" class="hover:text-gray-200 transition">Pricing</a>
|
47 |
+
</div>
|
48 |
+
<button class="bg-white text-purple-700 px-4 py-2 rounded-full font-semibold hover:bg-gray-100 transition">
|
49 |
+
Get Started
|
50 |
+
</button>
|
51 |
+
</div>
|
52 |
+
|
53 |
+
<div class="mt-16 text-center">
|
54 |
+
<h2 class="text-4xl md:text-5xl font-bold mb-4">Code Classification Model</h2>
|
55 |
+
<p class="text-xl max-w-3xl mx-auto">
|
56 |
+
AI-powered code classification for cybersecurity and software engineering
|
57 |
+
</p>
|
58 |
+
</div>
|
59 |
+
</div>
|
60 |
+
</header>
|
61 |
+
|
62 |
+
<main class="container mx-auto px-4 py-12 -mt-10">
|
63 |
+
<div class="bg-white rounded-xl shadow-xl overflow-hidden">
|
64 |
+
<div class="grid md:grid-cols-2 gap-0">
|
65 |
+
<!-- Input Section -->
|
66 |
+
<div class="p-6 bg-gray-50">
|
67 |
+
<h3 class="text-2xl font-semibold mb-4 text-gray-800">Analyze Your Code</h3>
|
68 |
+
<div class="mb-4">
|
69 |
+
<label class="block text-gray-700 mb-2">Select Language</label>
|
70 |
+
<div class="flex flex-wrap gap-2">
|
71 |
+
<button class="px-4 py-2 bg-purple-600 text-white rounded-full flex items-center">
|
72 |
+
<i class="fab fa-python mr-2"></i> Python
|
73 |
+
</button>
|
74 |
+
<button class="px-4 py-2 bg-yellow-400 text-gray-800 rounded-full flex items-center">
|
75 |
+
<i class="fab fa-js mr-2"></i> JavaScript
|
76 |
+
</button>
|
77 |
+
<button class="px-4 py-2 bg-blue-600 text-white rounded-full flex items-center">
|
78 |
+
<i class="fab fa-java mr-2"></i> Java
|
79 |
+
</button>
|
80 |
+
<button class="px-4 py-2 bg-red-500 text-white rounded-full flex items-center">
|
81 |
+
<i class="fas fa-code mr-2"></i> C++
|
82 |
+
</button>
|
83 |
+
</div>
|
84 |
+
</div>
|
85 |
+
|
86 |
+
<textarea
|
87 |
+
class="w-full code-input p-4 border border-gray-300 rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent"
|
88 |
+
placeholder="Paste your code here..."></textarea>
|
89 |
+
|
90 |
+
<div class="mt-4 flex justify-between items-center">
|
91 |
+
<div class="flex items-center space-x-2 text-gray-500">
|
92 |
+
<i class="fas fa-info-circle"></i>
|
93 |
+
<span>Supports up to 1000 lines of code</span>
|
94 |
+
</div>
|
95 |
+
<button class="gradient-bg text-white px-6 py-3 rounded-lg font-semibold hover:opacity-90 transition flex items-center">
|
96 |
+
<i class="fas fa-play mr-2"></i> Analyze Code
|
97 |
+
</button>
|
98 |
+
</div>
|
99 |
+
</div>
|
100 |
+
|
101 |
+
<!-- Results Section -->
|
102 |
+
<div class="p-6 bg-white">
|
103 |
+
<h3 class="text-2xl font-semibold mb-4 text-gray-800">Classification Results</h3>
|
104 |
+
|
105 |
+
<div class="space-y-4">
|
106 |
+
<!-- Sample Result Card -->
|
107 |
+
<div class="result-card bg-gray-50 p-4 rounded-lg border-l-4 border-purple-500">
|
108 |
+
<div class="flex justify-between items-start">
|
109 |
+
<div>
|
110 |
+
<span class="inline-block bg-purple-100 text-purple-800 px-2 py-1 rounded-full text-xs font-semibold language-tag">
|
111 |
+
Python
|
112 |
+
</span>
|
113 |
+
<h4 class="font-semibold mt-2">Web Application</h4>
|
114 |
+
<p class="text-sm text-gray-600">Flask-based web service with SQLAlchemy ORM</p>
|
115 |
+
</div>
|
116 |
+
<span class="bg-green-100 text-green-800 px-2 py-1 rounded-full text-xs font-semibold">
|
117 |
+
92% Confidence
|
118 |
+
</span>
|
119 |
+
</div>
|
120 |
+
</div>
|
121 |
+
|
122 |
+
<!-- Sample Security Result -->
|
123 |
+
<div class="result-card bg-gray-50 p-4 rounded-lg border-l-4 border-red-500">
|
124 |
+
<div class="flex justify-between items-start">
|
125 |
+
<div>
|
126 |
+
<span class="inline-block bg-red-100 text-red-800 px-2 py-1 rounded-full text-xs font-semibold">
|
127 |
+
Security
|
128 |
+
</span>
|
129 |
+
<h4 class="font-semibold mt-2">Potential SQL Injection</h4>
|
130 |
+
<p class="text-sm text-gray-600">Raw SQL query detected without parameterization</p>
|
131 |
+
</div>
|
132 |
+
<span class="bg-yellow-100 text-yellow-800 px-2 py-1 rounded-full text-xs font-semibold">
|
133 |
+
87% Confidence
|
134 |
+
</span>
|
135 |
+
</div>
|
136 |
+
</div>
|
137 |
+
|
138 |
+
<!-- Sample Performance Result -->
|
139 |
+
<div class="result-card bg-gray-50 p-4 rounded-lg border-l-4 border-blue-500">
|
140 |
+
<div class="flex justify-between items-start">
|
141 |
+
<div>
|
142 |
+
<span class="inline-block bg-blue-100 text-blue-800 px-2 py-1 rounded-full text-xs font-semibold">
|
143 |
+
Performance
|
144 |
+
</span>
|
145 |
+
<h4 class="font-semibold mt-2">N+1 Query Issue</h4>
|
146 |
+
<p class="text-sm text-gray-600">Multiple database queries detected in loop</p>
|
147 |
+
</div>
|
148 |
+
<span class="bg-green-100 text-green-800 px-2 py-1 rounded-full text-xs font-semibold">
|
149 |
+
85% Confidence
|
150 |
+
</span>
|
151 |
+
</div>
|
152 |
+
</div>
|
153 |
+
</div>
|
154 |
+
|
155 |
+
<div class="mt-6 p-4 bg-purple-50 rounded-lg">
|
156 |
+
<h4 class="font-semibold text-purple-800 mb-2">Model Details</h4>
|
157 |
+
<div class="grid grid-cols-2 gap-4 text-sm">
|
158 |
+
<div>
|
159 |
+
<p class="text-gray-600">Model Version</p>
|
160 |
+
<p class="font-medium">RabbitRedux v2.3.1</p>
|
161 |
+
</div>
|
162 |
+
<div>
|
163 |
+
<p class="text-gray-600">Training Data</p>
|
164 |
+
<p class="font-medium">1.2M code samples</p>
|
165 |
+
</div>
|
166 |
+
<div>
|
167 |
+
<p class="text-gray-600">Last Updated</p>
|
168 |
+
<p class="font-medium">June 2023</p>
|
169 |
+
</div>
|
170 |
+
<div>
|
171 |
+
<p class="text-gray-600">Accuracy</p>
|
172 |
+
<p class="font-medium">94.7%</p>
|
173 |
+
</div>
|
174 |
+
</div>
|
175 |
+
</div>
|
176 |
+
</div>
|
177 |
+
</div>
|
178 |
+
</div>
|
179 |
+
|
180 |
+
<!-- Features Section -->
|
181 |
+
<div class="mt-20 text-center">
|
182 |
+
<h2 class="text-3xl font-bold mb-4">Key Features</h2>
|
183 |
+
<p class="text-gray-600 max-w-2xl mx-auto mb-12">
|
184 |
+
RabbitRedux is optimized for modern development workflows with specialized capabilities
|
185 |
+
</p>
|
186 |
+
|
187 |
+
<div class="grid md:grid-cols-3 gap-8">
|
188 |
+
<div class="bg-white p-6 rounded-xl shadow-md hover:shadow-lg transition">
|
189 |
+
<div class="w-12 h-12 gradient-bg rounded-full flex items-center justify-center text-white mb-4 mx-auto">
|
190 |
+
<i class="fas fa-shield-alt text-xl"></i>
|
191 |
+
</div>
|
192 |
+
<h3 class="font-semibold text-lg mb-2">Cybersecurity Focus</h3>
|
193 |
+
<p class="text-gray-600">
|
194 |
+
Detects vulnerabilities like SQLi, XSS, and insecure dependencies with high accuracy
|
195 |
+
</p>
|
196 |
+
</div>
|
197 |
+
|
198 |
+
<div class="bg-white p-6 rounded-xl shadow-md hover:shadow-lg transition">
|
199 |
+
<div class="w-12 h-12 gradient-bg rounded-full flex items-center justify-center text-white mb-4 mx-auto">
|
200 |
+
<i class="fas fa-language text-xl"></i>
|
201 |
+
</div>
|
202 |
+
<h3 class="font-semibold text-lg mb-2">Multi-Language</h3>
|
203 |
+
<p class="text-gray-600">
|
204 |
+
Supports Python, JavaScript, Java, C++, and more with specialized models for each
|
205 |
+
</p>
|
206 |
+
</div>
|
207 |
+
|
208 |
+
<div class="bg-white p-6 rounded-xl shadow-md hover:shadow-lg transition">
|
209 |
+
<div class="w-12 h-12 gradient-bg rounded-full flex items-center justify-center text-white mb-4 mx-auto">
|
210 |
+
<i class="fas fa-bolt text-xl"></i>
|
211 |
+
</div>
|
212 |
+
<h3 class="font-semibold text-lg mb-2">Performance Optimized</h3>
|
213 |
+
<p class="text-gray-600">
|
214 |
+
Identifies performance anti-patterns and suggests optimizations
|
215 |
+
</p>
|
216 |
+
</div>
|
217 |
+
</div>
|
218 |
+
</div>
|
219 |
+
|
220 |
+
<!-- Call to Action -->
|
221 |
+
<div class="mt-20 gradient-bg rounded-xl p-8 text-white text-center">
|
222 |
+
<h2 class="text-3xl font-bold mb-4">Ready to enhance your code security?</h2>
|
223 |
+
<p class="text-xl mb-8 max-w-2xl mx-auto">
|
224 |
+
Integrate RabbitRedux into your development workflow today
|
225 |
+
</p>
|
226 |
+
<div class="flex justify-center space-x-4">
|
227 |
+
<button class="bg-white text-purple-700 px-6 py-3 rounded-lg font-semibold hover:bg-gray-100 transition">
|
228 |
+
Get Started
|
229 |
+
</button>
|
230 |
+
<button class="border-2 border-white px-6 py-3 rounded-lg font-semibold hover:bg-white hover:bg-opacity-10 transition">
|
231 |
+
View Documentation
|
232 |
+
</button>
|
233 |
+
</div>
|
234 |
+
</div>
|
235 |
+
</main>
|
236 |
+
|
237 |
+
<footer class="bg-gray-800 text-white py-12">
|
238 |
+
<div class="container mx-auto px-4">
|
239 |
+
<div class="grid md:grid-cols-4 gap-8">
|
240 |
+
<div>
|
241 |
+
<h3 class="text-xl font-semibold mb-4 flex items-center">
|
242 |
+
<i class="fas fa-code mr-2"></i> RabbitRedux
|
243 |
+
</h3>
|
244 |
+
<p class="text-gray-400">
|
245 |
+
Advanced AI for code classification and security analysis
|
246 |
+
</p>
|
247 |
+
</div>
|
248 |
+
<div>
|
249 |
+
<h4 class="font-semibold mb-4">Product</h4>
|
250 |
+
<ul class="space-y-2">
|
251 |
+
<li><a href="#" class="text-gray-400 hover:text-white transition">Features</a
|
252 |
+
</html>
|
prompts.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
π RabbitRedux Code Classification Model π Overview The RabbitRedux Code Classification Model is a transformer-based AI designed for code classification in cybersecurity and software engineering contexts. π§ Features β
Pre-trained on diverse datasets β
Fine-tuned for cybersecurity-focused classification β
Optimized for Python, JavaScript, and more
|