Spaces:
Sleeping
Sleeping
from smolagents import CodeAgent, HfApiModel | |
from retriever import guest_info_tool | |
# Initialize the Hugging Face model | |
model = HfApiModel() | |
# Create Alfred, our gala agent, with the guest info tool | |
alfred = CodeAgent( | |
tools=[guest_info_tool], | |
model=model | |
) | |
# Example query Alfred might receive during the gala | |
if __name__ == "__main__": | |
question = "Tell me about our guest named 'Lady Ada Lovelace'." | |
response = alfred.run(question) | |
print("π© Alfred's Response:") | |
print(response) | |