John6666 commited on
Commit
f268480
1 Parent(s): 650af8f

Upload prompt.py

Browse files
Files changed (1) hide show
  1. prompt.py +4 -1
prompt.py CHANGED
@@ -326,7 +326,10 @@ class HuggingFaceInferenceNode:
326
 
327
  def __init__(self):
328
  #self.client = InferenceClient("meta-llama/Meta-Llama-3.1-70B-Instruct") #
329
- self.client = OpenAI(base_url="https://api-inference.huggingface.co/v1/", api_key=huggingface_token)
 
 
 
330
  self.prompts_dir = "./prompts"
331
  os.makedirs(self.prompts_dir, exist_ok=True)
332
 
 
326
 
327
  def __init__(self):
328
  #self.client = InferenceClient("meta-llama/Meta-Llama-3.1-70B-Instruct") #
329
+ try:
330
+ self.client = OpenAI(base_url="https://api-inference.huggingface.co/v1/", api_key=huggingface_token)
331
+ except Exception as e:
332
+ print(e)
333
  self.prompts_dir = "./prompts"
334
  os.makedirs(self.prompts_dir, exist_ok=True)
335