reach-vb HF Staff commited on
Commit
bbc42e5
·
verified ·
1 Parent(s): 80c510e

I get this error: Login failed: HuggingFaceInference is not defined. Please check your token and try again. - Follow Up Deployment

Browse files
Files changed (1) hide show
  1. index.html +3 -3
index.html CHANGED
@@ -5,7 +5,7 @@
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
  <title>HuggingChat | Minimal AI Interface</title>
7
  <script src="https://cdn.tailwindcss.com"></script>
8
- <script src="https://unpkg.com/@huggingface/inference"></script>
9
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
10
  <style>
11
  .message-stream::after {
@@ -186,7 +186,7 @@
186
  if (!token) return;
187
 
188
  // Test the token with a lightweight request
189
- const testClient = new HuggingFaceInference(token);
190
  const response = await fetch('https://huggingface.co/api/whoami-v2', {
191
  headers: {
192
  'Authorization': `Bearer ${token}`
@@ -238,7 +238,7 @@
238
  const token = localStorage.getItem('hf_token');
239
  if (!token) throw new Error('No token found');
240
 
241
- hfClient = new HuggingFaceInference(token);
242
 
243
  // Update UI
244
  loginBtn.classList.add('hidden');
 
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
  <title>HuggingChat | Minimal AI Interface</title>
7
  <script src="https://cdn.tailwindcss.com"></script>
8
+ <script src="https://unpkg.com/@huggingface/inference@2.6.4"></script>
9
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
10
  <style>
11
  .message-stream::after {
 
186
  if (!token) return;
187
 
188
  // Test the token with a lightweight request
189
+ const testClient = new hf.Inference(token);
190
  const response = await fetch('https://huggingface.co/api/whoami-v2', {
191
  headers: {
192
  'Authorization': `Bearer ${token}`
 
238
  const token = localStorage.getItem('hf_token');
239
  if (!token) throw new Error('No token found');
240
 
241
+ hfClient = new hf.Inference(token);
242
 
243
  // Update UI
244
  loginBtn.classList.add('hidden');