mmichiels13 commited on
Commit
b098a45
·
verified ·
1 Parent(s): 714456f

Get API key automatically from Space environment

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -18,6 +18,9 @@ DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
18
  class BasicAgent:
19
  def __init__(self):
20
  print("BasicAgent initialized.")
 
 
 
21
 
22
  # Create the search tool
23
  self.search_tool = DuckDuckGoSearchTool()
 
18
  class BasicAgent:
19
  def __init__(self):
20
  print("BasicAgent initialized.")
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()