odellus commited on
Commit
4e5d406
·
verified ·
1 Parent(s): 2daed6b

Let's do something other than a heart for local LLM. like a computer or something

Browse files
Files changed (6) hide show
  1. README.md +7 -4
  2. components/footer.js +55 -0
  3. components/navbar.js +31 -0
  4. index.html +147 -19
  5. script.js +21 -0
  6. style.css +14 -19
README.md CHANGED
@@ -1,10 +1,13 @@
1
  ---
2
- title: Bytebrew Local Llm Playground
3
- emoji:
4
- colorFrom: gray
5
  colorTo: blue
 
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: ByteBrew - Local LLM Playground 🖥️
3
+ colorFrom: red
 
4
  colorTo: blue
5
+ emoji: 🐳
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite-v3
10
  ---
11
 
12
+ # Welcome to your new DeepSite project!
13
+ This project was created with [DeepSite](https://huggingface.co/deepsite).
components/footer.js ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class CustomFooter extends HTMLElement {
2
+ connectedCallback() {
3
+ this.attachShadow({ mode: 'open' });
4
+ this.shadowRoot.innerHTML = `
5
+ <style>
6
+ footer a:hover {
7
+ color: #a78bfa;
8
+ }
9
+ </style>
10
+ <footer class="bg-gray-800 border-t border-gray-700 py-12 mt-12">
11
+ <div class="container mx-auto px-4">
12
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-8">
13
+ <div>
14
+ <h3 class="text-lg font-bold mb-4">ByteBrew</h3>
15
+ <p class="text-gray-400 mb-4">The ultimate playground for running and experimenting with local language models.</p>
16
+ <div class="flex gap-4">
17
+ <a href="#" class="text-gray-400 hover:text-purple-400 transition-colors">
18
+ <i data-feather="github" class="w-5 h-5"></i>
19
+ </a>
20
+ <a href="#" class="text-gray-400 hover:text-purple-400 transition-colors">
21
+ <i data-feather="twitter" class="w-5 h-5"></i>
22
+ </a>
23
+ <a href="#" class="text-gray-400 hover:text-purple-400 transition-colors">
24
+ <i data-feather="discord" class="w-5 h-5"></i>
25
+ </a>
26
+ </div>
27
+ </div>
28
+ <div>
29
+ <h3 class="text-lg font-bold mb-4">Resources</h3>
30
+ <ul class="space-y-2">
31
+ <li><a href="#" class="text-gray-400 transition-colors">Documentation</a></li>
32
+ <li><a href="#" class="text-gray-400 transition-colors">Model Zoo</a></li>
33
+ <li><a href="#" class="text-gray-400 transition-colors">Benchmarks</a></li>
34
+ <li><a href="#" class="text-gray-400 transition-colors">Hardware Guide</a></li>
35
+ </ul>
36
+ </div>
37
+ <div>
38
+ <h3 class="text-lg font-bold mb-4">Community</h3>
39
+ <ul class="space-y-2">
40
+ <li><a href="#" class="text-gray-400 transition-colors">Forums</a></li>
41
+ <li><a href="#" class="text-gray-400 transition-colors">Contribute</a></li>
42
+ <li><a href="#" class="text-gray-400 transition-colors">Roadmap</a></li>
43
+ <li><a href="#" class="text-gray-400 transition-colors">Blog</a></li>
44
+ </ul>
45
+ </div>
46
+ </div>
47
+ <div class="border-t border-gray-700 mt-8 pt-8 text-center text-gray-500 text-sm">
48
+ <p>© 2023 ByteBrew. All rights reserved. Running AI locally since yesterday.</p>
49
+ </div>
50
+ </div>
51
+ </footer>
52
+ `;
53
+ }
54
+ }
55
+ customElements.define('custom-footer', CustomFooter);
components/navbar.js ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class CustomNavbar extends HTMLElement {
2
+ connectedCallback() {
3
+ this.attachShadow({ mode: 'open' });
4
+ this.shadowRoot.innerHTML = `
5
+ <style>
6
+ nav {
7
+ background: rgba(17, 24, 39, 0.8);
8
+ backdrop-filter: blur(8px);
9
+ }
10
+ </style>
11
+ <nav class="border-b border-gray-800 py existing-node-644">
12
+ <div class="container mx-auto px-4 flex justify-between items-center">
13
+ <a href="/" class="flex items-center gap-2">
14
+ <i data-feather="cpu" class="w-6 h-6 text-purple-400"></i>
15
+ <span class="font-bold text-xl bg-gradient-to-r from-purple-400 to-blue-500 bg-clip-text text-transparent">ByteBrew</span>
16
+ </a>
17
+ <div class="hidden md:flex items-center gap-6">
18
+ <a href="#playground" class="text-gray-300 hover:text-white transition-colors">Playground</a>
19
+ <a href="#models" class="text-gray-300 hover:text-white transition-colors">Models</a>
20
+ <a href="#" class="text-gray-300 hover:text-white transition-colors">Docs</a>
21
+ <a href="#" class="bg-purple-600 hover:bg-purple-700 text-white px-4 py-2 rounded-md transition-colors">Download</a>
22
+ </div>
23
+ <button class="md:hidden text-gray-300">
24
+ <i data-feather="menu" class="w-6 h-6"></i>
25
+ </button>
26
+ </div>
27
+ </nav>
28
+ `;
29
+ }
30
+ }
31
+ customElements.define('custom-navbar', CustomNavbar);
index.html CHANGED
@@ -1,19 +1,147 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en" class="dark">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>ByteBrew - Local LLM Playground</title>
7
+ <link rel="stylesheet" href="style.css">
8
+ <script src="https://cdn.tailwindcss.com"></script>
9
+ <script src="https://unpkg.com/feather-icons"></script>
10
+ <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
11
+ </head>
12
+ <body class="bg-gray-900 text-gray-100 min-h-screen">
13
+ <custom-navbar></custom-navbar>
14
+
15
+ <main class="container mx-auto px-4 py-8">
16
+ <section class="mb-12">
17
+ <div class="flex flex-col md:flex-row gap-8 items-center">
18
+ <div class="md:w-1/2">
19
+ <h1 class="text-4xl md:text-5xl font-bold mb-4 bg-gradient-to-r from-purple-400 to-blue-500 bg-clip-text text-transparent">Run LLMs Locally <br>Like a Pro</h1>
20
+ <p class="text-lg text-gray-300 mb-6">Experience the power of local language models with our intuitive playground. No cloud required, just pure computational prowess.</p>
21
+ <div class="flex gap-4">
22
+ <a href="#playground" class="bg-purple-600 hover:bg-purple-700 text-white px-6 py-3 rounded-lg font-medium transition-colors">Try It Now</a>
23
+ <a href="#models" class="border border-purple-500 text-purple-400 hover:bg-purple-900/30 px-6 py-3 rounded-lg font-medium transition-colors">Available Models</a>
24
+ </div>
25
+ </div>
26
+ <div class="md:w-1/2">
27
+ <div class="bg-gray-800 rounded-xl p-2 border border-gray-700 shadow-lg">
28
+ <div class="bg-gray-900 rounded-t-lg p-3 flex items-center gap-2">
29
+ <div class="w-3 h-3 rounded-full bg-red-500"></div>
30
+ <div class="w-3 h-3 rounded-full bg-yellow-500"></div>
31
+ <div class="w-3 h-3 rounded-full bg-green-500"></div>
32
+ </div>
33
+ <div class="p-4 font-mono text-sm">
34
+ <p class="text-green-400">$ ./run_llm --model llama2</p>
35
+ <p class="text-purple-400">>> Initializing local inference engine...</p>
36
+ <p class="text-blue-400">>> Model loaded successfully!</p>
37
+ <p class="text-green-400">$ Ask me anything:</p>
38
+ </div>
39
+ </div>
40
+ </div>
41
+ </div>
42
+ </section>
43
+
44
+ <section id="playground" class="mb-16">
45
+ <h2 class="text-2xl font-bold mb-6 flex items-center gap-2">
46
+ <i data-feather="cpu" class="w-6 h-6"></i> LLM Playground
47
+ </h2>
48
+ <div class="bg-gray-800 rounded-xl p-6 border border-gray-700">
49
+ <div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
50
+ <div>
51
+ <div class="mb-4">
52
+ <label class="block text-gray-300 mb-2">Select Model</label>
53
+ <select class="w-full bg-gray-700 border border-gray-600 rounded-md p-3 text-gray-200">
54
+ <option>Llama 2 7B</option>
55
+ <option>Mistral 7B</option>
56
+ <option>GPT4All</option>
57
+ <option>Bloom</option>
58
+ </select>
59
+ </div>
60
+ <div class="mb-4">
61
+ <label class="block text-gray-300 mb-2">Prompt</label>
62
+ <textarea class="w-full bg-gray-700 border border-gray-600 rounded-md p-3 text-gray-200 h-40" placeholder="Type your prompt here..."></textarea>
63
+ </div>
64
+ <button class="bg-purple-600 hover:bg-purple-700 text-white px-6 py-3 rounded-lg font-medium w-full transition-colors flex items-center justify-center gap-2">
65
+ <i data-feather="play"></i> Run Model
66
+ </button>
67
+ </div>
68
+ <div>
69
+ <label class="block text-gray-300 mb-2">Output</label>
70
+ <div class="bg-gray-900 border border-gray-700 rounded-md p-4 font-mono text-sm h-40 overflow-y-auto whitespace-pre-wrap">
71
+ <p class="text-gray-400">>> Model output will appear here</p>
72
+ </div>
73
+ <div class="mt-4 flex items-center text-sm text-gray-400">
74
+ <div class="flex-1">
75
+ <i data-feather="hard-drive" class="w-4 h-4 inline mr-2"></i>
76
+ <span>VRAM: 12GB</span>
77
+ </div>
78
+ <div>
79
+ <i data-feather="clock" class="w-4 h-4 inline mr-2"></i>
80
+ <span>Response Time: 0.4s</span>
81
+ </div>
82
+ </div>
83
+ </div>
84
+ </div>
85
+ </div>
86
+ </section>
87
+
88
+ <section id="models" class="mb-16">
89
+ <h2 class="text-2xl font-bold mb-6 flex items-center gap-2">
90
+ <i data-feather="database" class="w-6 h-6"></i> Available Models
91
+ </h2>
92
+ <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
93
+ <div class="bg-gray-800 rounded-xl p-6 border border-gray-700 hover:border-purple-500 transition-colors">
94
+ <div class="flex items-center gap-4 mb-4">
95
+ <div class="bg-purple-900/50 p-3 rounded-full">
96
+ <i data-feather="command" class="w-6 h-6 text-purple-400"></i>
97
+ </div>
98
+ <h3 class="text-xl font-bold">Llama 2 7B</h3>
99
+ </div>
100
+ <p class="text-gray-300 mb-4">Meta's open source model with 7 billion parameters, fine-tuned for conversation.</p>
101
+ <div class="flex flex-wrap gap-2">
102
+ <span class="bg-gray-700 text-xs px-3 py-1 rounded-full">Conversational</span>
103
+ <span class="bg-gray-700 text-xs px-3 py-1 rounded-full">7B Params</span>
104
+ <span class="bg-gray-700 text-xs px-3 py-1 rounded-full">8GB VRAM</span>
105
+ </div>
106
+ </div>
107
+ <div class="bg-gray-800 rounded-xl p-6 border border-gray-700 hover:border-blue-500 transition-colors">
108
+ <div class="flex items-center gap-4 mb-4">
109
+ <div class="bg-blue-900/50 p-3 rounded-full">
110
+ <i data-feather="wind" class="w-6 h-6 text-blue-400"></i>
111
+ </div>
112
+ <h3 class="text-xl font-bold">Mistral 7B</h3>
113
+ </div>
114
+ <p class="text-gray-300 mb-4">High quality instruction following model with strong reasoning capabilities.</p>
115
+ <div class="flex flex-wrap gap-2">
116
+ <span class="bg-gray-700 text-xs px-3 py-1 rounded-full">Instruction</span>
117
+ <span class="bg-gray-700 text-xs px-3 py-1 rounded-full">7B Params</span>
118
+ <span class="bg-gray-700 text-xs px-3 py-1 rounded-full">6GB VRAM</span>
119
+ </div>
120
+ </div>
121
+ <div class="bg-gray-800 rounded-xl p-6 border border-gray-700 hover:border-green-500 transition-colors">
122
+ <div class="flex items-center gap-4 mb-4">
123
+ <div class="bg-green-900/50 p-3 rounded-full">
124
+ <i data-feather="box" class="w-6 h-6 text-green-400"></i>
125
+ </div>
126
+ <h3 class="text-xl font-bold">GPT4All</h3>
127
+ </div>
128
+ <p class="text-gray-300 mb-4">Optimized for running on consumer hardware with surprisingly good performance.</p>
129
+ <div class="flex flex-wrap gap-2">
130
+ <span class="bg-gray-700 text-xs px-3 py-1 rounded-full">Lightweight</span>
131
+ <span class="bg-gray-700 text-xs px-3 py-1 rounded-full">3.5B Params</span>
132
+ <span class="bg-gray-700 text-xs px-3 py-1 rounded-full">4GB VRAM</span>
133
+ </div>
134
+ </div>
135
+ </div>
136
+ </section>
137
+ </main>
138
+
139
+ <custom-footer></custom-footer>
140
+
141
+ <script src="components/navbar.js"></script>
142
+ <script src="components/footer.js"></script>
143
+ <script src="script.js"></script>
144
+ <script>feather.replace();</script>
145
+ <script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
146
+ </body>
147
+ </html>
script.js ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Simulate model running
2
+ document.addEventListener('DOMContentLoaded', function() {
3
+ // This would connect to your actual local LLM in a real implementation
4
+ console.log('ByteBrew LLM Playground initialized');
5
+
6
+ // Example of running a model (placeholder for actual implementation)
7
+ const runButton = document.querySelector('#playground button');
8
+ if (runButton) {
9
+ runButton.addEventListener('click', function() {
10
+ const outputArea = document.querySelector('#playground .font-mono');
11
+ if (outputArea) {
12
+ outputArea.innerHTML = `
13
+ <p class="text-purple-400">>> Initializing local inference engine...</p>
14
+ <p class="text-blue-400">>> Model loaded successfully!</p>
15
+ <p class="text-gray-200">>> Here's the response to your prompt:</p>
16
+ <p class="text-gray-200 mt-2">This is a simulated response from your local LLM. In a real implementation, this would be the actual output from your local model.</p>
17
+ `;
18
+ }
19
+ });
20
+ }
21
+ });
style.css CHANGED
@@ -1,28 +1,23 @@
 
 
1
  body {
2
- padding: 2rem;
3
- font-family: -apple-system, BlinkMacSystemFont, "Arial", sans-serif;
4
  }
5
 
6
- h1 {
7
- font-size: 16px;
8
- margin-top: 0;
9
  }
10
 
11
- p {
12
- color: rgb(107, 114, 128);
13
- font-size: 15px;
14
- margin-bottom: 10px;
15
- margin-top: 5px;
16
  }
17
 
18
- .card {
19
- max-width: 620px;
20
- margin: 0 auto;
21
- padding: 16px;
22
- border: 1px solid lightgray;
23
- border-radius: 16px;
24
  }
25
 
26
- .card p:last-child {
27
- margin-bottom: 0;
28
- }
 
1
+ @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
2
+
3
  body {
4
+ font-family: 'Inter', sans-serif;
 
5
  }
6
 
7
+ /* Custom scrollbar */
8
+ ::-webkit-scrollbar {
9
+ width: 8px;
10
  }
11
 
12
+ ::-webkit-scrollbar-track {
13
+ background: #1a202c;
 
 
 
14
  }
15
 
16
+ ::-webkit-scrollbar-thumb {
17
+ background: #6b46c1;
18
+ border-radius: 4px;
 
 
 
19
  }
20
 
21
+ ::-webkit-scrollbar-thumb:hover {
22
+ background: #805ad5;
23
+ }