yummyfiles commited on
Commit
9b8124a
·
verified ·
1 Parent(s): e8fb2cf

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.js +5 -1
app.js CHANGED
@@ -230,8 +230,10 @@ async function runInference(prompt, history) {
230
  }
231
 
232
  async function handleSend() {
233
- if (isLoading) return;
 
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;