Spaces:
Runtime error
Runtime error
Commit
·
31d57ff
1
Parent(s):
1f1d641
changed to uvicorn setup for HF v13
Browse files- main/api.py +1 -1
- main/main.py +1 -1
main/api.py
CHANGED
@@ -51,7 +51,7 @@ class InferenceApi(LitAPI):
|
|
51 |
stream: bool = False
|
52 |
) -> Any:
|
53 |
"""Make an authenticated request to the LLM Server."""
|
54 |
-
access_token = os.environ.get("
|
55 |
headers = {"Authorization": f"Bearer {access_token}"} if access_token else {}
|
56 |
base_url = self.llm_config.get('base_url', 'http://localhost:8002')
|
57 |
full_endpoint = f"{base_url.rstrip('/')}/{self._get_endpoint(endpoint).lstrip('/')}"
|
|
|
51 |
stream: bool = False
|
52 |
) -> Any:
|
53 |
"""Make an authenticated request to the LLM Server."""
|
54 |
+
access_token = os.environ.get("InfAPITokenWrite")
|
55 |
headers = {"Authorization": f"Bearer {access_token}"} if access_token else {}
|
56 |
base_url = self.llm_config.get('base_url', 'http://localhost:8002')
|
57 |
full_endpoint = f"{base_url.rstrip('/')}/{self._get_endpoint(endpoint).lstrip('/')}"
|
main/main.py
CHANGED
@@ -36,7 +36,7 @@ def create_app():
|
|
36 |
logger = setup_logging()
|
37 |
|
38 |
# Log into Hugging Face Hub
|
39 |
-
access_token = os.environ.get("
|
40 |
if access_token:
|
41 |
try:
|
42 |
login(token=access_token)
|
|
|
36 |
logger = setup_logging()
|
37 |
|
38 |
# Log into Hugging Face Hub
|
39 |
+
access_token = os.environ.get("InfAPITokenWrite")
|
40 |
if access_token:
|
41 |
try:
|
42 |
login(token=access_token)
|