Login to Hugging Face with the token
Browse files
app.py
CHANGED
|
@@ -21,6 +21,9 @@ class BasicAgent:
|
|
| 21 |
|
| 22 |
# Get API key automatically from Space environment
|
| 23 |
api_key = os.getenv("HF_API_KEY")
|
|
|
|
|
|
|
|
|
|
| 24 |
|
| 25 |
# Create the search tool
|
| 26 |
self.search_tool = DuckDuckGoSearchTool()
|
|
|
|
| 21 |
|
| 22 |
# Get API key automatically from Space environment
|
| 23 |
api_key = os.getenv("HF_API_KEY")
|
| 24 |
+
|
| 25 |
+
# Login to Hugging Face with the token
|
| 26 |
+
login(token=api_key)
|
| 27 |
|
| 28 |
# Create the search tool
|
| 29 |
self.search_tool = DuckDuckGoSearchTool()
|