Spaces:
Running
on
Zero
Running
on
Zero
Upload prompt.py
Browse files
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 |
-
|
|
|
|
|
|
|
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 |
|