KalooAI commited on
Commit
d5206b5
·
verified ·
1 Parent(s): eafbe54

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -60,13 +60,15 @@ client = InferenceClient(HF_MODEL_ID, token=os.getenv("HF_TOKEN"))
60
  import os
61
  from langchain_huggingface import HuggingFaceEndpoint, ChatHuggingFace
62
 
 
 
63
  # 1. Create the endpoint with the 'conversational' task
64
  llm_endpoint = HuggingFaceEndpoint(
65
  #repo_id="mistralai/Mistral-7B-Instruct-v0.3",
66
  repo_id = "HuggingFaceH4/zephyr-7b-beta",
67
- task="conversational", # Change this from 'text-generation'
68
  max_new_tokens=512,
69
- huggingfacehub_api_token=os.getenv("HF_TOKEN"),
70
  )
71
 
72
  # 2. Wrap it in ChatHuggingFace
 
60
  import os
61
  from langchain_huggingface import HuggingFaceEndpoint, ChatHuggingFace
62
 
63
+ hf_token = os.getenv("HF_TOKEN")
64
+
65
  # 1. Create the endpoint with the 'conversational' task
66
  llm_endpoint = HuggingFaceEndpoint(
67
  #repo_id="mistralai/Mistral-7B-Instruct-v0.3",
68
  repo_id = "HuggingFaceH4/zephyr-7b-beta",
69
+ task="text-generation",
70
  max_new_tokens=512,
71
+ huggingfacehub_api_token=hf_token,
72
  )
73
 
74
  # 2. Wrap it in ChatHuggingFace