Spaces:
Runtime error
Runtime error
Update my_agent.py
Browse files- my_agent.py +5 -5
my_agent.py
CHANGED
|
@@ -8,11 +8,11 @@ from langchain_community.tools import DuckDuckGoSearchRun
|
|
| 8 |
import os
|
| 9 |
|
| 10 |
# Load environment variables from .env file
|
| 11 |
-
with open('.env') as f:
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
|
| 17 |
@tool
|
| 18 |
def get_file_from_documents(file_name: str) -> BinaryIO:
|
|
|
|
| 8 |
import os
|
| 9 |
|
| 10 |
# Load environment variables from .env file
|
| 11 |
+
# with open('.env') as f:
|
| 12 |
+
# for line in f:
|
| 13 |
+
# if line.strip() and not line.startswith('#'):
|
| 14 |
+
# key, value = line.strip().split('=', 1)
|
| 15 |
+
# os.environ[key] = value
|
| 16 |
|
| 17 |
@tool
|
| 18 |
def get_file_from_documents(file_name: str) -> BinaryIO:
|