Spaces:
Running
Running
Update index.html (#1)
Browse files- Update index.html (d885371ea3b822fb1c6130bd7c87cf01a9bb8a8b)
- index.html +102 -34
index.html
CHANGED
|
@@ -1,54 +1,122 @@
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
This is a minimal demo app showcasing how WebLLM enables AI chat
|
| 17 |
-
directly in your local browser. You might also enjoy exploring
|
| 18 |
-
|
| 19 |
-
<a
|
| 20 |
-
href="https://chat.webllm.ai/"
|
| 21 |
-
rel="nofollow noopener noreferrer"
|
| 22 |
-
target="_blank"
|
| 23 |
-
style="display: inline;"
|
| 24 |
-
>WebLLM Chat</a
|
| 25 |
-
>!
|
| 26 |
-
</p>
|
| 27 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
<h2>Step 1: Initialize WebLLM and Download Model</h2>
|
| 29 |
<div class="download-container">
|
| 30 |
<select id="model-selection"></select>
|
| 31 |
<button id="download">Download</button>
|
| 32 |
</div>
|
| 33 |
<p id="download-status" class="hidden"></p>
|
|
|
|
| 34 |
|
|
|
|
| 35 |
<h2>Step 2: Chat</h2>
|
| 36 |
<div class="chat-container">
|
| 37 |
<div id="chat-box" class="chat-box"></div>
|
| 38 |
<div id="chat-stats" class="chat-stats hidden"></div>
|
| 39 |
<div class="chat-input-container">
|
| 40 |
<div class="chat-input">
|
| 41 |
-
<input
|
| 42 |
-
type="text"
|
| 43 |
-
id="user-input"
|
| 44 |
-
placeholder="Type a message..."
|
| 45 |
-
/>
|
| 46 |
<button id="send" disabled>Send</button>
|
| 47 |
</div>
|
| 48 |
</div>
|
| 49 |
</div>
|
| 50 |
-
</
|
|
|
|
| 51 |
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
</html>
|
|
|
|
| 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>WebLLM Simple Chat Space</title>
|
| 7 |
+
<link rel="stylesheet" href="styles/katex.min.css" />
|
| 8 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/default.min.css" />
|
| 9 |
+
<style>
|
| 10 |
+
/* Add some basic styling to make the output look prettier */
|
| 11 |
+
body {
|
| 12 |
+
font-family: Arial, sans-serif;
|
| 13 |
+
margin: 20px;
|
| 14 |
+
background-color: #f0f0f0;
|
| 15 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
|
| 17 |
+
main {
|
| 18 |
+
max-width: 800px;
|
| 19 |
+
margin: 0 auto;
|
| 20 |
+
padding: 20px;
|
| 21 |
+
background-color: #fff;
|
| 22 |
+
border: 1px solid #ddd;
|
| 23 |
+
border-radius: 10px;
|
| 24 |
+
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
h1 {
|
| 28 |
+
color: #00698f;
|
| 29 |
+
}
|
| 30 |
+
|
| 31 |
+
section {
|
| 32 |
+
margin-bottom: 20px;
|
| 33 |
+
}
|
| 34 |
+
|
| 35 |
+
.download-container {
|
| 36 |
+
margin-top: 10px;
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
.chat-container {
|
| 40 |
+
margin-top: 20px;
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
.chat-box {
|
| 44 |
+
padding: 10px;
|
| 45 |
+
border: 1px solid #ddd;
|
| 46 |
+
border-radius: 10px;
|
| 47 |
+
background-color: #f9f9f9;
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
.chat-input-container {
|
| 51 |
+
margin-top: 10px;
|
| 52 |
+
}
|
| 53 |
+
|
| 54 |
+
.chat-input {
|
| 55 |
+
display: flex;
|
| 56 |
+
align-items: center;
|
| 57 |
+
}
|
| 58 |
+
|
| 59 |
+
#user-input {
|
| 60 |
+
width: 80%;
|
| 61 |
+
padding: 10px;
|
| 62 |
+
border: 1px solid #ddd;
|
| 63 |
+
border-radius: 10px;
|
| 64 |
+
}
|
| 65 |
+
|
| 66 |
+
#send {
|
| 67 |
+
width: 20%;
|
| 68 |
+
padding: 10px;
|
| 69 |
+
background-color: #4CAF50;
|
| 70 |
+
color: #fff;
|
| 71 |
+
border: none;
|
| 72 |
+
border-radius: 10px;
|
| 73 |
+
cursor: pointer;
|
| 74 |
+
}
|
| 75 |
+
|
| 76 |
+
#send:hover {
|
| 77 |
+
background-color: #3e8e41;
|
| 78 |
+
}
|
| 79 |
+
|
| 80 |
+
#send:disabled {
|
| 81 |
+
background-color: #ccc;
|
| 82 |
+
cursor: not-allowed;
|
| 83 |
+
}
|
| 84 |
+
</style>
|
| 85 |
+
<link rel="stylesheet" href="styles/style.css" />
|
| 86 |
+
</head>
|
| 87 |
+
|
| 88 |
+
<body>
|
| 89 |
+
<main>
|
| 90 |
+
<h1>WebLLM Simple Chat Space</h1>
|
| 91 |
+
<p>
|
| 92 |
+
This is a minimal demo app showcasing how WebLLM enables AI chat directly in your local browser.
|
| 93 |
+
You might also enjoy exploring <a href="https://chat.webllm.ai/" rel="nofollow noopener noreferrer" target="_blank">WebLLM Chat</a>!
|
| 94 |
+
</p>
|
| 95 |
+
|
| 96 |
+
<section>
|
| 97 |
<h2>Step 1: Initialize WebLLM and Download Model</h2>
|
| 98 |
<div class="download-container">
|
| 99 |
<select id="model-selection"></select>
|
| 100 |
<button id="download">Download</button>
|
| 101 |
</div>
|
| 102 |
<p id="download-status" class="hidden"></p>
|
| 103 |
+
</section>
|
| 104 |
|
| 105 |
+
<section>
|
| 106 |
<h2>Step 2: Chat</h2>
|
| 107 |
<div class="chat-container">
|
| 108 |
<div id="chat-box" class="chat-box"></div>
|
| 109 |
<div id="chat-stats" class="chat-stats hidden"></div>
|
| 110 |
<div class="chat-input-container">
|
| 111 |
<div class="chat-input">
|
| 112 |
+
<input type="text" id="user-input" placeholder="Type a message..." />
|
|
|
|
|
|
|
|
|
|
|
|
|
| 113 |
<button id="send" disabled>Send</button>
|
| 114 |
</div>
|
| 115 |
</div>
|
| 116 |
</div>
|
| 117 |
+
</section>
|
| 118 |
+
</main>
|
| 119 |
|
| 120 |
+
<script src="./dist/index.js" type="module"></script>
|
| 121 |
+
</body>
|
| 122 |
+
</html>
|