Instructions to use yummyfiles/Bob with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use yummyfiles/Bob with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('text-generation', 'yummyfiles/Bob');
Upload folder using huggingface_hub
Browse files
app.js
CHANGED
|
@@ -230,8 +230,10 @@ async function runInference(prompt, history) {
|
|
| 230 |
}
|
| 231 |
|
| 232 |
async function handleSend() {
|
| 233 |
-
|
|
|
|
| 234 |
const prompt = inputEl.value.trim();
|
|
|
|
| 235 |
if (!prompt) return;
|
| 236 |
|
| 237 |
if (!currentChatId) currentChatId = createChat();
|
|
@@ -242,7 +244,9 @@ async function handleSend() {
|
|
| 242 |
executeBtn.textContent = 'THINKING...';
|
| 243 |
|
| 244 |
const history = chats[currentChatId]?.messages.slice(-6) || [];
|
|
|
|
| 245 |
const result = await runInference(prompt, history);
|
|
|
|
| 246 |
appendMessage('assistant', result);
|
| 247 |
|
| 248 |
executeBtn.disabled = false;
|
|
|
|
| 230 |
}
|
| 231 |
|
| 232 |
async function handleSend() {
|
| 233 |
+
console.log('handleSend called, isLoading:', isLoading);
|
| 234 |
+
if (isLoading) { console.log('Model still loading'); return; }
|
| 235 |
const prompt = inputEl.value.trim();
|
| 236 |
+
console.log('Prompt:', prompt);
|
| 237 |
if (!prompt) return;
|
| 238 |
|
| 239 |
if (!currentChatId) currentChatId = createChat();
|
|
|
|
| 244 |
executeBtn.textContent = 'THINKING...';
|
| 245 |
|
| 246 |
const history = chats[currentChatId]?.messages.slice(-6) || [];
|
| 247 |
+
console.log('History:', history);
|
| 248 |
const result = await runInference(prompt, history);
|
| 249 |
+
console.log('Result:', result);
|
| 250 |
appendMessage('assistant', result);
|
| 251 |
|
| 252 |
executeBtn.disabled = false;
|