jeevzz commited on
Commit
e917e6e
·
verified ·
1 Parent(s): 192c089

Update chat.py

Browse files
Files changed (1) hide show
  1. chat.py +2 -0
chat.py CHANGED
@@ -10,6 +10,8 @@ load_dotenv(dotenv_path=env_path)
10
  # Use Qwen 2.5 - works well with chat and is less restricted
11
  MODEL_ID = "NousResearch/Hermes-2-Pro-Llama-3-8B"
12
  HF_TOKEN = os.getenv("HF_TOKEN")
 
 
13
 
14
  def get_chat_response(message: str, history: list):
15
  client = InferenceClient(model=MODEL_ID, token=HF_TOKEN)
 
10
  # Use Qwen 2.5 - works well with chat and is less restricted
11
  MODEL_ID = "NousResearch/Hermes-2-Pro-Llama-3-8B"
12
  HF_TOKEN = os.getenv("HF_TOKEN")
13
+ if HF_TOKEN:
14
+ HF_TOKEN = HF_TOKEN.strip()
15
 
16
  def get_chat_response(message: str, history: list):
17
  client = InferenceClient(model=MODEL_ID, token=HF_TOKEN)