Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
| 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:
|