prakashknaikade commited on
Commit
b9be76a
·
1 Parent(s): 6afc72e

add verification

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -1,5 +1,6 @@
1
  import gradio as gr
2
  from huggingface_hub import InferenceClient
 
3
 
4
  # RAG imports
5
  import os
@@ -11,7 +12,12 @@ from langchain.text_splitter import RecursiveCharacterTextSplitter
11
  """
12
  For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
13
  """
14
- client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
 
 
 
 
 
15
 
16
  # We'll load the existing FAISS index at the start
17
  INDEX_FOLDER = "faiss_index"
 
1
  import gradio as gr
2
  from huggingface_hub import InferenceClient
3
+ import os
4
 
5
  # RAG imports
6
  import os
 
12
  """
13
  For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
14
  """
15
+ hf_token = os.environ.get("HUGGINGFACEHUB_API_TOKEN")
16
+ client = InferenceClient(
17
+ model="HuggingFaceH4/zephyr-7b-beta",
18
+ token=hf_token # <-- This is critical
19
+ )
20
+
21
 
22
  # We'll load the existing FAISS index at the start
23
  INDEX_FOLDER = "faiss_index"