Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -30,7 +30,7 @@ class ClassificationResponse(BaseModel):
|
|
30 |
class HuggingFaceInferenceClient:
|
31 |
def __init__(self, model_name: str = "meta-llama/Meta-Llama-3-8B-Instruct", api_token: str = None):
|
32 |
self.model_name = model_name
|
33 |
-
self.api_token = api_token or ""
|
34 |
if not self.api_token:
|
35 |
raise ValueError("Hugging Face API token not provided")
|
36 |
self.headers = {
|
|
|
30 |
class HuggingFaceInferenceClient:
|
31 |
def __init__(self, model_name: str = "meta-llama/Meta-Llama-3-8B-Instruct", api_token: str = None):
|
32 |
self.model_name = model_name
|
33 |
+
self.api_token = api_token or os.getenv("HF_API_TOKEN")
|
34 |
if not self.api_token:
|
35 |
raise ValueError("Hugging Face API token not provided")
|
36 |
self.headers = {
|