Spaces:
Sleeping
Sleeping
Commit ·
ff4f388
1
Parent(s): 4af6c30
minor fix
Browse files- .huggingface.yml +1 -1
- utils/api_config.py +3 -3
.huggingface.yml
CHANGED
|
@@ -32,4 +32,4 @@ secrets:
|
|
| 32 |
- FOURSQUARE_API_KEY
|
| 33 |
- OPENAI_API_KEY
|
| 34 |
- API_KEY
|
| 35 |
-
-
|
|
|
|
| 32 |
- FOURSQUARE_API_KEY
|
| 33 |
- OPENAI_API_KEY
|
| 34 |
- API_KEY
|
| 35 |
+
- HUGGINGFACE_HUB_TOKEN
|
utils/api_config.py
CHANGED
|
@@ -9,14 +9,14 @@ class APIConfig:
|
|
| 9 |
"""Centralized API configuration and validation."""
|
| 10 |
|
| 11 |
def __init__(self):
|
| 12 |
-
self.foursquare_api_key = os.environ.get('FOURSQUARE_API_KEY'
|
| 13 |
self.anthropic_api_key = os.environ.get('ANTHROPIC_API_KEY')
|
| 14 |
|
| 15 |
# MCP Server configuration
|
| 16 |
self.mcp_server_url = "https://srikanthnagelli-mcp-server.hf.space/gradio_api/mcp/sse"
|
| 17 |
|
| 18 |
-
# Set environment if not already set
|
| 19 |
-
if not os.environ.get('FOURSQUARE_API_KEY'):
|
| 20 |
os.environ['FOURSQUARE_API_KEY'] = self.foursquare_api_key
|
| 21 |
|
| 22 |
def validate_apis(self) -> Dict[str, bool]:
|
|
|
|
| 9 |
"""Centralized API configuration and validation."""
|
| 10 |
|
| 11 |
def __init__(self):
|
| 12 |
+
self.foursquare_api_key = os.environ.get('FOURSQUARE_API_KEY')
|
| 13 |
self.anthropic_api_key = os.environ.get('ANTHROPIC_API_KEY')
|
| 14 |
|
| 15 |
# MCP Server configuration
|
| 16 |
self.mcp_server_url = "https://srikanthnagelli-mcp-server.hf.space/gradio_api/mcp/sse"
|
| 17 |
|
| 18 |
+
# Set environment if not already set and key is available
|
| 19 |
+
if self.foursquare_api_key and not os.environ.get('FOURSQUARE_API_KEY'):
|
| 20 |
os.environ['FOURSQUARE_API_KEY'] = self.foursquare_api_key
|
| 21 |
|
| 22 |
def validate_apis(self) -> Dict[str, bool]:
|