Spaces:
Running
Running
Update index.html
Browse files- index.html +26 -757
index.html
CHANGED
@@ -3,781 +3,50 @@
|
|
3 |
<head>
|
4 |
<meta charset="UTF-8">
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
-
<title>
|
7 |
-
<link rel="icon" href="/favicon.ico" type="image/x-icon">
|
8 |
-
<link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;600&display=swap" rel="stylesheet">
|
9 |
-
<link href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.24.1/themes/prism-tomorrow.min.css" rel="stylesheet" />
|
10 |
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.24.1/prism.min.js"></script>
|
11 |
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.24.1/components/prism-json.min.js"></script>
|
12 |
<style>
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
--accent: #0071e3;
|
19 |
-
--border: #333336;
|
20 |
-
--card-bg: #1c1c1e;
|
21 |
}
|
22 |
|
23 |
* {
|
24 |
margin: 0;
|
25 |
padding: 0;
|
26 |
box-sizing: border-box;
|
27 |
-
cursor: none;
|
28 |
}
|
29 |
|
30 |
body {
|
31 |
-
background-color:
|
32 |
-
color: var(--text-primary);
|
33 |
-
font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
|
34 |
-
line-height: 1.5;
|
35 |
-
}
|
36 |
-
/* Customize scrollbar for WebKit browsers (Chrome, Safari, Edge) */
|
37 |
-
body::-webkit-scrollbar {
|
38 |
-
width: 12px; /* Set the width of the scrollbar */
|
39 |
-
}
|
40 |
-
|
41 |
-
body::-webkit-scrollbar-thumb {
|
42 |
-
background-color: #1a1a1a; /* Scrollbar color */
|
43 |
-
border-radius: 10px; /* Round edges */
|
44 |
-
transition: background-color 200ms ease; /* Smooth transition for background color */
|
45 |
-
}
|
46 |
-
|
47 |
-
body::-webkit-scrollbar-track {
|
48 |
-
background: none; /* Track color */
|
49 |
-
border-radius: 10px; /* Match rounding */
|
50 |
-
}
|
51 |
-
|
52 |
-
body::-webkit-scrollbar-thumb:hover {
|
53 |
-
width: 20px;
|
54 |
-
background-color: #2a2a2a; /* Change color on hover */
|
55 |
-
}
|
56 |
-
|
57 |
-
|
58 |
-
.container {
|
59 |
-
max-width: 800px;
|
60 |
-
margin: 0 auto;
|
61 |
-
padding: 2rem;
|
62 |
-
}
|
63 |
-
|
64 |
-
/* Header styles */
|
65 |
-
header {
|
66 |
-
padding: 8rem 0;
|
67 |
-
text-align: center;
|
68 |
-
background: var(--bg-secondary);
|
69 |
-
border-radius: 12px;
|
70 |
-
margin-bottom: 4rem;
|
71 |
-
border: 1px solid var(--border);
|
72 |
-
position: relative;
|
73 |
-
overflow: hidden;
|
74 |
-
}
|
75 |
-
|
76 |
-
/* Before pseudo-element for hover effect */
|
77 |
-
header::before {
|
78 |
-
content: '';
|
79 |
-
position: absolute;
|
80 |
-
top: 0;
|
81 |
-
left: 0;
|
82 |
-
right: 0;
|
83 |
-
bottom: 0;
|
84 |
-
background: radial-gradient(circle at var(--x, 50%) var(--y, 50%),
|
85 |
-
rgba(59, 130, 246, 0.1) 0%,
|
86 |
-
transparent 50%);
|
87 |
-
pointer-events: none;
|
88 |
-
opacity: 0;
|
89 |
-
transition: opacity 0.3s ease;
|
90 |
-
}
|
91 |
-
|
92 |
-
header:hover::before {
|
93 |
-
opacity: 1;
|
94 |
-
}
|
95 |
-
|
96 |
-
/* Scroll Down indicator styles */
|
97 |
-
.scroll-indicator {
|
98 |
-
position: absolute;
|
99 |
-
bottom: 20px; /* Place it just below the header padding */
|
100 |
-
left: 50%;
|
101 |
-
transform: translateX(-50%);
|
102 |
-
opacity: 0;
|
103 |
-
font-size: 12px;
|
104 |
-
color: #8f8f8f;
|
105 |
-
transition: opacity 0.3s ease, transform 0.3s ease;
|
106 |
-
}
|
107 |
-
|
108 |
-
/* Arrow styling */
|
109 |
-
.arrow {
|
110 |
-
font-size: 12px;
|
111 |
-
transition: transform 0.3s ease;
|
112 |
-
}
|
113 |
-
|
114 |
-
/* On hover, make the text appear and move up */
|
115 |
-
header:hover .scroll-indicator {
|
116 |
-
opacity: 1;
|
117 |
-
transform: translate(-50%, -10px); /* Move it up slightly */
|
118 |
-
}
|
119 |
-
|
120 |
-
header:hover .scroll-indicator .arrow {
|
121 |
-
transform: translateY(10px); /* Bounce the arrow a little */
|
122 |
-
}
|
123 |
-
|
124 |
-
|
125 |
-
h1 {
|
126 |
-
font-size: 5.5rem;
|
127 |
-
font-weight: 700;
|
128 |
-
letter-spacing: -0.03em;
|
129 |
-
margin-bottom: 1rem;
|
130 |
-
background: linear-gradient(135deg, #fff 0%, #888 100%);
|
131 |
-
-webkit-background-clip: text;
|
132 |
-
background-clip: text;
|
133 |
-
-webkit-text-fill-color: transparent;
|
134 |
-
}
|
135 |
-
|
136 |
-
header p {
|
137 |
-
color: var(--text-secondary);
|
138 |
-
font-size: 1.2rem;
|
139 |
-
}
|
140 |
-
|
141 |
-
.section {
|
142 |
-
background: var(--card-bg);
|
143 |
-
border-radius: 20px;
|
144 |
-
padding: 2rem;
|
145 |
-
margin-bottom: 2rem;
|
146 |
-
border: 1px solid var(--border);
|
147 |
-
}
|
148 |
-
|
149 |
-
h2 {
|
150 |
-
font-size: 1.8rem;
|
151 |
-
margin-bottom: 1.5rem;
|
152 |
-
color: var(--text-primary);
|
153 |
-
}
|
154 |
-
|
155 |
-
h3 {
|
156 |
-
font-size: 1.2rem;
|
157 |
-
margin: 1.5rem 0 0.75rem;
|
158 |
-
color: var(--text-primary);
|
159 |
-
}
|
160 |
-
|
161 |
-
.endpoint {
|
162 |
-
background: var(--bg-primary);
|
163 |
-
padding: 1rem;
|
164 |
-
border-radius: 12px;
|
165 |
-
font-family: 'JetBrains Mono', monospace;
|
166 |
-
margin: 0.5rem 0;
|
167 |
-
border: 1px solid var(--border);
|
168 |
-
overflow: hidden;
|
169 |
-
}
|
170 |
-
|
171 |
-
.btn {
|
172 |
-
display: inline-block;
|
173 |
-
background: var(--accent);
|
174 |
color: white;
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
border: none;
|
181 |
-
cursor: pointer;
|
182 |
-
margin: 0.5rem 0;
|
183 |
-
}
|
184 |
-
|
185 |
-
.btn:hover {
|
186 |
-
background: #0077ED;
|
187 |
-
transform: translateY(-1px);
|
188 |
-
}
|
189 |
-
|
190 |
-
.models-list {
|
191 |
-
display: grid;
|
192 |
-
grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
|
193 |
-
gap: 1rem;
|
194 |
-
margin-top: 1rem;
|
195 |
-
}
|
196 |
-
|
197 |
-
.model-item {
|
198 |
-
background: var(--bg-primary);
|
199 |
-
padding: 1rem;
|
200 |
-
border-radius: 12px;
|
201 |
-
text-align: center;
|
202 |
-
border: 1px solid var(--border);
|
203 |
-
transition: all 0.2s ease;
|
204 |
-
}
|
205 |
-
|
206 |
-
.model-item:hover {
|
207 |
-
border-color: var(--accent);
|
208 |
-
transform: translateY(-2px);
|
209 |
-
}
|
210 |
-
.model-item.glow {
|
211 |
-
font-weight: 700;
|
212 |
-
position: relative;
|
213 |
-
border: 2px solid transparent; /* Initial border with no color */
|
214 |
-
background-clip: padding-box; /* Ensure background doesn’t interfere with border */
|
215 |
-
animation: slideBorder 3s ease-in-out infinite; /* Smooth transition with ease-in-out */
|
216 |
-
border-radius: 5px; /* Optional: rounded corners */
|
217 |
-
}
|
218 |
-
|
219 |
-
@keyframes slideBorder {
|
220 |
-
0% {
|
221 |
-
border-color: rgba(255, 215, 0, 0.2); /* Soft gold */
|
222 |
-
}
|
223 |
-
50% {
|
224 |
-
border-color: rgba(255, 215, 0, 0.8); /* Brighter gold */
|
225 |
-
}
|
226 |
-
100% {
|
227 |
-
border-color: rgba(255, 215, 0, 0.2); /* Soft gold */
|
228 |
-
}
|
229 |
-
}
|
230 |
-
|
231 |
-
|
232 |
-
pre {
|
233 |
-
border-radius: 12px;
|
234 |
-
margin: 1rem 0;
|
235 |
-
background: var(--bg-primary) !important;
|
236 |
-
border: 1px solid var(--border);
|
237 |
-
}
|
238 |
-
|
239 |
-
code {
|
240 |
-
font-family: 'JetBrains Mono', monospace;
|
241 |
-
}
|
242 |
-
|
243 |
-
.contact-section {
|
244 |
text-align: center;
|
245 |
-
|
246 |
-
background: var(--card-bg);
|
247 |
-
border-radius: 20px;
|
248 |
-
border: 1px solid var(--border);
|
249 |
-
}
|
250 |
-
|
251 |
-
footer {
|
252 |
-
text-align: center;
|
253 |
-
padding: 2rem;
|
254 |
-
color: var(--text-secondary);
|
255 |
-
}
|
256 |
-
|
257 |
-
@media (max-width: 768px) {
|
258 |
-
.container {
|
259 |
-
padding: 1rem;
|
260 |
-
}
|
261 |
-
|
262 |
-
h1 {
|
263 |
-
font-size: 2.5rem;
|
264 |
-
}
|
265 |
-
|
266 |
-
.section {
|
267 |
-
padding: 1.5rem;
|
268 |
-
}
|
269 |
-
}
|
270 |
-
.cursor {
|
271 |
-
width: 20px;
|
272 |
-
height: 20px;
|
273 |
-
border: 2px solid var(--accent);
|
274 |
-
border-radius: 50%;
|
275 |
-
position: fixed;
|
276 |
-
pointer-events: none;
|
277 |
-
z-index: 99999;
|
278 |
-
transition: all 0.1s ease;
|
279 |
-
transition-property: width, height, border;
|
280 |
}
|
281 |
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
position: fixed;
|
288 |
-
pointer-events: none;
|
289 |
-
z-index: 99999;
|
290 |
}
|
291 |
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
position: fixed;
|
298 |
-
pointer-events: none;
|
299 |
-
z-index: 99998;
|
300 |
-
transition: 0.1s;
|
301 |
}
|
302 |
-
.notification {
|
303 |
-
position: fixed;
|
304 |
-
top: 20px;
|
305 |
-
right: -300px; /* Initially off-screen to the right */
|
306 |
-
padding: 10px 20px;
|
307 |
-
background-color: #2ecc71; /* Green background color */
|
308 |
-
color: #fff;
|
309 |
-
border-radius: 5px;
|
310 |
-
opacity: 0;
|
311 |
-
transition: all 0.5s ease-in-out; /* Transition for all properties */
|
312 |
-
}
|
313 |
-
|
314 |
-
.notification.show {
|
315 |
-
opacity: 1;
|
316 |
-
right: 20px; /* Move to the desired position */
|
317 |
-
}
|
318 |
-
body {
|
319 |
-
margin: 0;
|
320 |
-
padding: 0;
|
321 |
-
}
|
322 |
-
|
323 |
-
.popup-overlay {
|
324 |
-
position: fixed;
|
325 |
-
top: 0;
|
326 |
-
left: 0;
|
327 |
-
width: 100%;
|
328 |
-
height: 100%;
|
329 |
-
background: rgba(0, 0, 0, 0.9);
|
330 |
-
display: flex;
|
331 |
-
justify-content: center;
|
332 |
-
align-items: center;
|
333 |
-
z-index: 10000; /* Higher value to ensure it appears on top */
|
334 |
-
backdrop-filter: blur(6px); /* Soft blur effect */
|
335 |
-
}
|
336 |
-
|
337 |
-
.popup-container {
|
338 |
-
width: 500px;
|
339 |
-
padding: 20px;
|
340 |
-
background: linear-gradient(135deg, #111, #2d2d2d); /* Gradient dark background */
|
341 |
-
border-radius: 40px;
|
342 |
-
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.6); /* Soft shadow */
|
343 |
-
transform: scale(0.98);
|
344 |
-
animation: slideIn 0.5s ease-out;
|
345 |
-
position: relative; /* Make sure it's positioned */
|
346 |
-
}
|
347 |
-
|
348 |
-
@keyframes slideIn {
|
349 |
-
0% {
|
350 |
-
opacity: 0;
|
351 |
-
transform: scale(0.9);
|
352 |
-
}
|
353 |
-
100% {
|
354 |
-
opacity: 1;
|
355 |
-
transform: scale(1);
|
356 |
-
}
|
357 |
-
}
|
358 |
-
|
359 |
-
.close-btn {
|
360 |
-
position: absolute;
|
361 |
-
top: 15px;
|
362 |
-
right: 15px;
|
363 |
-
background: transparent;
|
364 |
-
border: none;
|
365 |
-
color: white;
|
366 |
-
font-size: 24px;
|
367 |
-
cursor: pointer;
|
368 |
-
outline: none;
|
369 |
-
z-index: 101; /* Higher value to ensure it appears on top */
|
370 |
-
}
|
371 |
-
|
372 |
-
.popup-title {
|
373 |
-
text-align: center;
|
374 |
-
font-size: 27px;
|
375 |
-
color: white;
|
376 |
-
text-transform: uppercase;
|
377 |
-
background: linear-gradient(90deg, #fff, #d3d3d3);
|
378 |
-
-webkit-background-clip: text;
|
379 |
-
color: transparent;
|
380 |
-
animation: shimmer 2s infinite linear;
|
381 |
-
}
|
382 |
-
|
383 |
-
@keyframes shimmer {
|
384 |
-
0% {
|
385 |
-
background-position: -100%;
|
386 |
-
}
|
387 |
-
100% {
|
388 |
-
background-position: 100%;
|
389 |
-
}
|
390 |
-
}
|
391 |
-
|
392 |
-
.popup-subtitle {
|
393 |
-
text-align: center;
|
394 |
-
font-size: 20px;
|
395 |
-
color: #b3b3b3;
|
396 |
-
margin-top: 10px;
|
397 |
-
}
|
398 |
-
|
399 |
-
.highlight-section {
|
400 |
-
margin-top: 20px;
|
401 |
-
}
|
402 |
-
|
403 |
-
.description {
|
404 |
-
color: white;
|
405 |
-
font-size: 11px;
|
406 |
-
line-height: 1.5;
|
407 |
-
text-align: center;
|
408 |
-
}
|
409 |
-
|
410 |
-
/* Responsive design */
|
411 |
-
@media (max-width: 600px) {
|
412 |
-
.popup-container {
|
413 |
-
width: 90%;
|
414 |
-
padding: 15px;
|
415 |
-
}
|
416 |
-
|
417 |
-
.popup-title {
|
418 |
-
font-size: 28px;
|
419 |
-
}
|
420 |
-
|
421 |
-
.popup-subtitle {
|
422 |
-
font-size: 18px;
|
423 |
-
}
|
424 |
-
|
425 |
-
.description {
|
426 |
-
font-size: 14px;
|
427 |
-
}
|
428 |
-
}
|
429 |
</style>
|
430 |
</head>
|
431 |
<body>
|
432 |
-
<
|
433 |
-
<
|
434 |
-
<div class="cursor-trail"></div>
|
435 |
-
<div class="container">
|
436 |
-
<div class="popup-overlay">
|
437 |
-
<div class="popup-container">
|
438 |
-
<button class="close-btn" aria-label="Close">x</button>
|
439 |
-
<h1 class="popup-title">O1-PREVIEW ADDED !!</h1>
|
440 |
-
<h2 class="popup-subtitle">The First Reasoning Model from OpenAI</h2>
|
441 |
-
<div class="highlight-section">
|
442 |
-
<p class="description">O1-preview: Advanced AI model by OpenAI, optimized for complex reasoning with a transformer structure and reinforcement learning. Slower than GPT-4o but more accurate in reasoning. Improved safety through new training methods. Pricing: $0.01575/1K input tokens, $0.063/1K output tokens.</p>
|
443 |
-
</div>
|
444 |
-
</div>
|
445 |
-
</div>
|
446 |
-
<header>
|
447 |
-
<h1>Loki.AI API</h1>
|
448 |
-
<p>Powerful AI Integration at Your Fingertips For Free</p>
|
449 |
-
<p style="margin-top: 10px;">Made With ❤️ by
|
450 |
-
<a href="https://github.com/ParthSadaria" style="text-decoration: none; color: inherit; font-weight: bold; transition: 500ms ease;"
|
451 |
-
onmouseover="this.style.textShadow='0 0 15px #FFFFFF';"
|
452 |
-
onmouseout="this.style.textShadow='none';">
|
453 |
-
Parth Sadaria
|
454 |
-
</a>
|
455 |
-
</p>
|
456 |
-
<div class="scroll-indicator">
|
457 |
-
<span>Scroll Down For More Info<br><span class="arrow">v</span></span>
|
458 |
-
</div>
|
459 |
-
</header>
|
460 |
-
<!-- <marquee>🥳🔥 NEW!! IMAGE GENERATION ENDPOINT :)</marquee> -->
|
461 |
-
<!-- <marquee>🔥BACK UP AND RUNNING WOHOOO🔥</marquee> -->
|
462 |
-
|
463 |
-
<marquee>Server Temporarily down due to Heavy Load Crash 💯</marquee>
|
464 |
-
<marquee>🔥 O1-Preview 🔥</marquee>
|
465 |
-
<!--<marquee>🔥MANY MODELS ARE DOWN🔥 FIXING THE ISSUE AS SOON AS POSSIBLE :)</marquee> -->
|
466 |
-
<section class="section">
|
467 |
-
<h2>Quick Start Guide</h2>
|
468 |
-
|
469 |
-
<h3>NEW!!!-Playground (Beta) 🥳🥳</h3>
|
470 |
-
<div class="endpoint">https://parthsadaria-lokiai.hf.space/playground</div>
|
471 |
-
|
472 |
-
<h3>Base URL</h3>
|
473 |
-
<div class="endpoint">https://parthsadaria-lokiai.hf.space</div>
|
474 |
-
|
475 |
-
<h3>Chat Completion URL</h3>
|
476 |
-
<div class="endpoint">https://parthsadaria-lokiai.hf.space/chat/completions</div>
|
477 |
-
|
478 |
-
<h3>Searchgpt URL</h3>
|
479 |
-
<div class="endpoint">https://parthsadaria-lokiai.hf.space/searchgpt?q=todays news</div>
|
480 |
-
<small>
|
481 |
-
<b>Note:</b> Use <code>&stream=true</code> to enable streaming responses.
|
482 |
-
</small>
|
483 |
-
|
484 |
-
<h5>Get requests only | Supports stream :) | set &stream=true</h5>
|
485 |
-
<h3> Image Generation URL 🥳🥳 (Powered by <a href="https://www.pollinations.ai" style="text-decoration: underline; color: inherit;">Pollinations.ai</a>)</h3>
|
486 |
-
<div class="endpoint">https://parthsadaria-lokiai.hf.space/images/generations?prompt=sky%20northern%20lights</div>
|
487 |
-
<small>
|
488 |
-
<b>Parameters:</b>
|
489 |
-
<ul>
|
490 |
-
<li><b>prompt:</b> (required) Text description of the image.</li>
|
491 |
-
<li><b>model:</b> (optional) Model to use (default: "flux").</li>
|
492 |
-
<li><b>seed:</b> (optional) Random seed for reproducibility.</li>
|
493 |
-
<li><b>width:</b> (optional) Image width in pixels.</li>
|
494 |
-
<li><b>height:</b> (optional) Image height in pixels.</li>
|
495 |
-
</ul>
|
496 |
-
</small>
|
497 |
-
<h3>Memes go brrrrrr~</h3>
|
498 |
-
<div class="endpoint">https://parthsadaria-lokiai.hf.space/meme</div>
|
499 |
-
|
500 |
-
<h3>Global Usage Checker :) (if you are curious)</h3>
|
501 |
-
<div class="endpoint">https://parthsadaria-lokiai.hf.space/usage/page</div>
|
502 |
-
|
503 |
-
<h3>Models Endpoint</h3>
|
504 |
-
<h5>Both Models Image and Chat are mentioned here</h5>
|
505 |
-
<div class="endpoint">https://parthsadaria-lokiai.hf.space/models</div>
|
506 |
-
|
507 |
-
|
508 |
-
<h3>Authentication</h3>
|
509 |
-
<h6>ITS FREE :) NO NEED FOR ANY AUTH WOHOOOOO!! 🥳</h6>
|
510 |
-
</section>
|
511 |
-
|
512 |
-
<section class="section">
|
513 |
-
<h2>Request Format</h2>
|
514 |
-
<pre><code class="language-json">{
|
515 |
-
"model": "gpt-4o",
|
516 |
-
"messages": [
|
517 |
-
{
|
518 |
-
"role": "user",
|
519 |
-
"content": "Hello, AI!"
|
520 |
-
}
|
521 |
-
],
|
522 |
-
"stream": False #specify it
|
523 |
-
}</code></pre>
|
524 |
-
<h3>Response Format</h3>
|
525 |
-
<pre><code class="language-json">{{
|
526 |
-
"id": "chatcmpl-89DmxGJl4oqEultjlLBnGfdkV7Euk",
|
527 |
-
"model": "gpt-4o",
|
528 |
-
"object": "chat.completion",
|
529 |
-
"created": 1731674826,
|
530 |
-
"choices": [
|
531 |
-
{
|
532 |
-
"index": 0,
|
533 |
-
"message": {
|
534 |
-
"role": "assistant",
|
535 |
-
"content": "Hello! How can I assist you today?"
|
536 |
-
},
|
537 |
-
"finish_reason": "stop"
|
538 |
-
}
|
539 |
-
],
|
540 |
-
"usage": {
|
541 |
-
"prompt_tokens": 11,
|
542 |
-
"completion_tokens": 9,
|
543 |
-
"total_tokens": 20
|
544 |
-
}
|
545 |
-
}
|
546 |
-
}</code></pre>
|
547 |
-
</section>
|
548 |
-
<section class="section">
|
549 |
-
<h2>Example Usage</h2>
|
550 |
-
<pre style="font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif; font-size: small; padding: 10px 10px; color: rgb(201, 209, 217); background-color: rgb(13, 17, 23); font-weight: 400; "
|
551 |
-
onmouseover="this.querySelector('button').style.transform='translateX(0)'; this.querySelector('button').style.display='';"
|
552 |
-
onmouseout="this.querySelector('button').style.transform='translateX(100%) ';this.querySelector('button').style.display='none';">
|
553 |
-
<span style="color: rgb(255, 123, 114); font-weight: 400;">import</span> openai <button
|
554 |
-
style="display: none; transition: transform 200ms ease, display 0s ease 200ms; position: absolute; right: 26%; color: white; background-color: black; padding: 7px 7px; border: 2px solid #1c1c1e; border-radius: 15px; font-family:'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif; "
|
555 |
-
onclick="copyText(code);"
|
556 |
-
>Copy</button>
|
557 |
-
<span style="color: rgb(139, 148, 158); font-weight: 400;"># hampe to he hi no :p (not needed)</span>
|
558 |
-
api_key = <span style="color: rgb(165, 214, 255); font-weight: 400;">''</span>
|
559 |
-
<span style="color: rgb(139, 148, 158); font-weight: 400;"># Use the custom API endpoint</span>
|
560 |
-
openai.api_base = <span style="color: rgb(165, 214, 255); font-weight: 400;">"https://parthsadaria-lokiai.hf.space"</span>
|
561 |
-
openai.api_key = api_key
|
562 |
-
<span style="color: rgb(255, 123, 114); font-weight: 400;">def</span> <span style="color: rgb(210, 168, 255); font-weight: 400;">chat_with_gpt</span>():
|
563 |
-
<span style="color: rgb(255, 123, 114); font-weight: 400;">try</span>:
|
564 |
-
response = openai.ChatCompletion.create(
|
565 |
-
model=<span style="color: rgb(165, 214, 255); font-weight: 400;">"gpt-4o"</span>,
|
566 |
-
messages=[{<span style="color: rgb(165, 214, 255); font-weight: 400;">"role"</span>: <span style="color: rgb(165, 214, 255); font-weight: 400;">"user"</span>, <span style="color: rgb(165, 214, 255); font-weight: 400;">"content"</span>: <span style="color: rgb(165, 214, 255); font-weight: 400;">"hi homie"</span>}],
|
567 |
-
stream=<span style="color: rgb(121, 192, 255); font-weight: 400;">False</span>
|
568 |
-
)
|
569 |
-
<span style="color: rgb(255, 166, 87); font-weight: 400;">print</span>(response[<span style="color: rgb(165, 214, 255); font-weight: 400;">'choices'</span>][<span style="color: rgb(121, 192, 255); font-weight: 400;">0</span>][<span style="color: rgb(165, 214, 255); font-weight: 400;">'message'</span>][<span style="color: rgb(165, 214, 255); font-weight: 400;">'content'</span>])
|
570 |
-
<span style="color: rgb(255, 123, 114); font-weight: 400;">except</span> Exception <span style="color: rgb(255, 123, 114); font-weight: 400;">as</span> e:
|
571 |
-
<span style="color: rgb(255, 166, 87); font-weight: 400;">print</span>(<span style="color: rgb(165, 214, 255); font-weight: 400;">f"Error: <span style="color: rgb(201, 209, 217); font-weight: 400;">{e}</span>"</span>)
|
572 |
-
chat_with_gpt()
|
573 |
-
</pre>
|
574 |
-
</section>
|
575 |
-
<section class="section">
|
576 |
-
<h2>Available Models</h2>
|
577 |
-
<div class="notification" id="notification">Text copied!</div>
|
578 |
-
<p>More info at <span style="text-decoration: underline; cursor: pointer;" onclick="window.location.href='https://parthsadaria-lokiai.hf.space/models'">https://parthsadaria-lokiai.hf.space/models</span></p>
|
579 |
-
<div class="models-list">
|
580 |
-
<!-- Models with "stable & fast" -->
|
581 |
-
<div class="model-item glow">gpt-4o<br><strong>stable & fast</strong></div>
|
582 |
-
<div class="model-item glow">gpt-4o-mini <br><strong>stable & fast</strong></div>
|
583 |
-
<div class="model-item glow">claude-3-haiku<br><strong>stable & fast</strong></div>
|
584 |
-
<div class="model-item glow">llama-3.1-405b<br><strong>stable & fast</strong></div>
|
585 |
-
<div class="model-item glow">llama-3.1-70b<br><strong>stable & fast</strong></div>
|
586 |
-
<div class="model-item glow">llama-3.1-8b<br><strong>stable & fast</strong></div>
|
587 |
-
<div class="model-item glow">gemini-1.5-flash<br><strong>stable & fast</strong></div>
|
588 |
-
<div class="model-item glow">mixtral-8x7b<br><strong>stable & fast</strong></div>
|
589 |
-
<div class="model-item glow">command-r<br><strong>stable & fast</strong></div>
|
590 |
-
<div class="model-item glow">gemini-pro<br><strong>stable & fast</strong></div>
|
591 |
-
<div class="model-item glow">gpt-3.5-turbo<br><strong>stable & fast</strong></div>
|
592 |
-
<div class="model-item glow">command<br><strong>stable & fast</strong></div>
|
593 |
-
|
594 |
-
</div>
|
595 |
-
</div>
|
596 |
-
|
597 |
-
</section>
|
598 |
-
|
599 |
-
<section class="contact-section" style="text-align: center; display: flex; flex-direction: column; align-items: center;">
|
600 |
-
<h2>Contact Me 👋</h2>
|
601 |
-
<p style="color: var(--text-secondary); margin-bottom: 1.5rem;">Contact me directly for Loki.AI integration! Report Bugs and issues 🐛</p>
|
602 |
-
<div style="display: flex; gap: 1rem; justify-content: center;">
|
603 |
-
<a href="https://github.com/Parthsadaria/FreeGPT-API" target="_blank" class="btn" style="display: flex; align-items: center; gap: 0.5rem;">
|
604 |
-
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
605 |
-
<path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"/>
|
606 |
-
</svg>
|
607 |
-
GitHub 💻
|
608 |
-
</a>
|
609 |
-
<a href="https://t.me/parth_sadaria" target="_blank" class="btn" style="display: flex; align-items: center; gap: 0.5rem;">
|
610 |
-
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
611 |
-
<path d="M22 3L2 10l7 3.5L19 7l-7 8 3 5L22 3z"/>
|
612 |
-
</svg>
|
613 |
-
Telegram 📱
|
614 |
-
</a>
|
615 |
-
</div>
|
616 |
-
</section>
|
617 |
-
|
618 |
-
|
619 |
-
<footer>
|
620 |
-
<h2 id="warning-banner" style="text-align: center; margin: 2rem 0; padding: 1rem; background: rgba(255, 247, 237, 0.8); border-radius: 8px; border: 1px solid #FFB74D; color: #B45309; font-size: 1rem; line-height: 1.6;">
|
621 |
-
⚠️ Note: This service uses third-party AI models. While we aim for the best experience, please verify any important information. This API is provided free of charge - please be considerate and don't abuse it! 🤗 Let's keep it running smoothly for everyone! ✨
|
622 |
-
</h2>
|
623 |
-
<p>Built with ❤️ by Parth Sadaria</p>
|
624 |
-
</footer>
|
625 |
-
</div>
|
626 |
-
|
627 |
-
<script>
|
628 |
-
var code=`import openai
|
629 |
-
# hampe to he hi no :p (not needed)
|
630 |
-
api_key = ''
|
631 |
-
# Use the custom API endpoint
|
632 |
-
openai.api_base = "https://parthsadaria-lokiai.hf.space"
|
633 |
-
openai.api_key = api_key
|
634 |
-
def chat_with_gpt():
|
635 |
-
try:
|
636 |
-
response = openai.ChatCompletion.create(
|
637 |
-
model="gpt-4o",
|
638 |
-
messages=[{"role": "user", "content": "hi homie"}],
|
639 |
-
stream=False
|
640 |
-
)
|
641 |
-
print(response['choices'][0]['message']['content'])
|
642 |
-
except Exception as e: \
|
643 |
-
print(f"Error: {e}")
|
644 |
-
chat_with_gpt()`;
|
645 |
-
function copyText(textToCopy) {
|
646 |
-
navigator.clipboard.writeText(textToCopy)
|
647 |
-
.then(() => {
|
648 |
-
document.getElementById("notification").classList.add("show");
|
649 |
-
|
650 |
-
// Hide the notification after 2 seconds
|
651 |
-
setTimeout(() => {
|
652 |
-
document.getElementById("notification").classList.remove("show");
|
653 |
-
}, 2000);
|
654 |
-
})
|
655 |
-
.catch(err => console.error('Failed to copy text:', err));
|
656 |
-
}
|
657 |
-
document.addEventListener('DOMContentLoaded', function() {
|
658 |
-
|
659 |
-
const cursor = document.querySelector('.cursor');
|
660 |
-
const cursorDot = document.querySelector('.cursor-dot');
|
661 |
-
const cursorTrail = document.querySelector('.cursor-trail');
|
662 |
-
|
663 |
-
let mouseX = 0;
|
664 |
-
let mouseY = 0;
|
665 |
-
let cursorX = 0;
|
666 |
-
let cursorY = 0;
|
667 |
-
let trailX = 0;
|
668 |
-
let trailY = 0;
|
669 |
-
|
670 |
-
// Function to update sizes dynamically
|
671 |
-
function getSizes() {
|
672 |
-
return {
|
673 |
-
cursorSize: parseInt(getComputedStyle(cursor).width),
|
674 |
-
dotSize: parseInt(getComputedStyle(cursorDot).width),
|
675 |
-
trailSize: parseInt(getComputedStyle(cursorTrail).width)
|
676 |
-
};
|
677 |
-
}
|
678 |
-
|
679 |
-
document.addEventListener('mousemove', (e) => {
|
680 |
-
mouseX = e.clientX;
|
681 |
-
mouseY = e.clientY;
|
682 |
-
|
683 |
-
// Update header gradient
|
684 |
-
const header = document.querySelector('header');
|
685 |
-
if (header) {
|
686 |
-
const rect = header.getBoundingClientRect();
|
687 |
-
const x = ((e.clientX - rect.left) / rect.width) * 100;
|
688 |
-
const y = ((e.clientY - rect.top) / rect.height) * 100;
|
689 |
-
header.style.setProperty('--x', `${x}%`);
|
690 |
-
header.style.setProperty('--y', `${y}%`);
|
691 |
-
}
|
692 |
-
|
693 |
-
// Update glow effects
|
694 |
-
document.querySelectorAll('[data-glow]').forEach(element => {
|
695 |
-
const rect = element.getBoundingClientRect();
|
696 |
-
const x = ((e.clientX - rect.left) / rect.width) * 100;
|
697 |
-
const y = ((e.clientY - rect.top) / rect.height) * 100;
|
698 |
-
element.style.setProperty('--x', `${x}%`);
|
699 |
-
element.style.setProperty('--y', `${y}%`);
|
700 |
-
});
|
701 |
-
});
|
702 |
-
// Smooth cursor animation
|
703 |
-
function animate() {
|
704 |
-
const { cursorSize, dotSize, trailSize } = getSizes(); // Get sizes each frame
|
705 |
-
|
706 |
-
// Calculate movement for cursor and trail
|
707 |
-
const dxCursor = mouseX - cursorX;
|
708 |
-
const dyCursor = mouseY - cursorY;
|
709 |
-
|
710 |
-
cursorX += dxCursor * 0.15; // Faster follow
|
711 |
-
cursorY += dyCursor * 0.15;
|
712 |
-
|
713 |
-
// Trail follows cursor with a slight delay
|
714 |
-
const dxTrail = cursorX - trailX;
|
715 |
-
const dyTrail = cursorY - trailY;
|
716 |
-
|
717 |
-
trailX += dxTrail * 0.1;
|
718 |
-
trailY += dyTrail * 0.1;
|
719 |
-
|
720 |
-
// Apply transformations based on dynamic sizes
|
721 |
-
cursor.style.transform = `translate(${cursorX - cursorSize / 2}px, ${cursorY - cursorSize / 2}px)`;
|
722 |
-
cursorDot.style.transform = `translate(${mouseX - dotSize / 2}px, ${mouseY - dotSize / 2}px)`;
|
723 |
-
cursorTrail.style.transform = `translate(${trailX - trailSize / 2}px, ${trailY - trailSize / 2}px)`;
|
724 |
-
|
725 |
-
requestAnimationFrame(animate);
|
726 |
-
}
|
727 |
-
animate();
|
728 |
-
|
729 |
-
// Cursor interactions with smooth transitions
|
730 |
-
document.querySelectorAll('a, button, .section').forEach(element => {
|
731 |
-
element.addEventListener('mouseenter', () => {
|
732 |
-
cursor.style.transition = 'width 0.2s ease, height 0.2s ease';
|
733 |
-
cursor.style.width = '30px';
|
734 |
-
cursor.style.height = '30px';
|
735 |
-
cursor.style.backgroundColor = 'rgba(59, 130, 246, 1)';
|
736 |
-
});
|
737 |
-
|
738 |
-
element.addEventListener('mouseleave', () => {
|
739 |
-
cursor.style.transition = 'width 0.2s ease, height 0.2s ease';
|
740 |
-
cursor.style.width = '20px';
|
741 |
-
cursor.style.height = '20px';
|
742 |
-
cursor.style.backgroundColor = 'transparent';
|
743 |
-
});
|
744 |
-
});
|
745 |
-
|
746 |
-
// Prevent cursor from disappearing
|
747 |
-
document.addEventListener('mouseout', () => {
|
748 |
-
cursor.style.opacity = '0';
|
749 |
-
cursorDot.style.opacity = '0';
|
750 |
-
cursorTrail.style.opacity = '0';
|
751 |
-
});
|
752 |
-
|
753 |
-
document.addEventListener('mouseover', () => {
|
754 |
-
cursor.style.opacity = '1';
|
755 |
-
cursorDot.style.opacity = '1';
|
756 |
-
cursorTrail.style.opacity = '1';
|
757 |
-
});
|
758 |
-
|
759 |
-
// Initialize Prism
|
760 |
-
Prism.highlightAll();
|
761 |
-
});
|
762 |
-
document.querySelector('.close-btn').addEventListener('click', () => {
|
763 |
-
// Store the original text of the notification
|
764 |
-
const notification = document.getElementById("notification");
|
765 |
-
const originalText = notification.innerText;
|
766 |
-
document.querySelector('.popup-overlay').style.display = 'none';
|
767 |
-
// Change the text to the new message
|
768 |
-
notification.innerText = "Achievement complete added: O1-preview";
|
769 |
-
notification.classList.add("show");
|
770 |
-
|
771 |
-
// Hide the notification after 2 seconds and reset the text
|
772 |
-
setTimeout(() => {
|
773 |
-
notification.classList.remove("show");
|
774 |
-
notification.innerText = originalText;
|
775 |
-
|
776 |
-
// Ensure that the overlay stays visible or hidden as per your logic
|
777 |
-
// If you need to hide the popup overlay after 2 seconds, add this line:
|
778 |
-
}, 2000);
|
779 |
-
});
|
780 |
-
|
781 |
-
</script>
|
782 |
</body>
|
783 |
-
</html>
|
|
|
3 |
<head>
|
4 |
<meta charset="UTF-8">
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
+
<title>Loki.AI - By Parth Sadaria</title>
|
|
|
|
|
|
|
|
|
|
|
7 |
<style>
|
8 |
+
@font-face {
|
9 |
+
font-family: 'Instrument Serif';
|
10 |
+
src: url('https://openwebui.com/assets/fonts/InstrumentSerif-Regular.ttf') format('truetype');
|
11 |
+
font-weight: normal;
|
12 |
+
font-style: normal;
|
|
|
|
|
|
|
13 |
}
|
14 |
|
15 |
* {
|
16 |
margin: 0;
|
17 |
padding: 0;
|
18 |
box-sizing: border-box;
|
|
|
19 |
}
|
20 |
|
21 |
body {
|
22 |
+
background-color: black;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
color: white;
|
24 |
+
display: flex;
|
25 |
+
flex-direction: column;
|
26 |
+
justify-content: center;
|
27 |
+
align-items: center;
|
28 |
+
height: 100vh;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
text-align: center;
|
30 |
+
font-family: 'Instrument Serif', serif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
}
|
32 |
|
33 |
+
h1 {
|
34 |
+
font-size: 9rem;
|
35 |
+
font-weight: bold;
|
36 |
+
letter-spacing: -3px;
|
37 |
+
text-transform: uppercase;
|
|
|
|
|
|
|
38 |
}
|
39 |
|
40 |
+
p {
|
41 |
+
font-size: 2rem;
|
42 |
+
color: grey;
|
43 |
+
margin-top: -10px;
|
44 |
+
letter-spacing: 1px;
|
|
|
|
|
|
|
|
|
45 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
</style>
|
47 |
</head>
|
48 |
<body>
|
49 |
+
<h1>Loki.AI</h1>
|
50 |
+
<p>By Parth Sadaria</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
</body>
|
52 |
+
</html>
|