ATK20 commited on
Commit
1bd35c1
·
verified ·
1 Parent(s): 168cfe8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -11,8 +11,8 @@ DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
11
  class BasicAgent:
12
  def __init__(self):
13
  print("BasicAgent initialized.")
14
- self.client = InferenceClient("mistralai/Mistral-7B-Instruct-v0.1")
15
-
16
  def __call__(self, question: str) -> str:
17
  print(f"Agent received question: {question[:50]}...")
18
  try:
 
11
  class BasicAgent:
12
  def __init__(self):
13
  print("BasicAgent initialized.")
14
+ token = os.getenv("HUGGINGFACEHUB_API_TOKEN")
15
+ self.client = InferenceClient("mistralai/Mistral-7B-Instruct-v0.1", token=token)
16
  def __call__(self, question: str) -> str:
17
  print(f"Agent received question: {question[:50]}...")
18
  try: