Spaces:
Sleeping
Sleeping
Create Integrate the Tool with Alfred
Browse files
Integrate the Tool with Alfred
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from smolagents import CodeAgent, HfApiModel
|
2 |
+
|
3 |
+
# Initialize the Hugging Face model
|
4 |
+
model = HfApiModel()
|
5 |
+
|
6 |
+
# Create Alfred, our gala agent, with the guest info tool
|
7 |
+
alfred = CodeAgent(tools=[guest_info_tool], model=model)
|
8 |
+
|
9 |
+
# Example query Alfred might receive during the gala
|
10 |
+
response = alfred.run("Tell me about our guest named 'Lady Ada Lovelace'.")
|
11 |
+
|
12 |
+
print("🎩 Alfred's Response:")
|
13 |
+
print(response)
|