Ubik80 commited on
Commit
62b52cd
·
verified ·
1 Parent(s): ac0dee2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -0
app.py CHANGED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from smolagents import CodeAgent, HfApiModel
2
+ from retriever import guest_info_tool
3
+
4
+ # Initialize the Hugging Face model
5
+ model = HfApiModel()
6
+
7
+ # Create Alfred, our gala agent, with the guest info tool
8
+ alfred = CodeAgent(
9
+ tools=[guest_info_tool],
10
+ model=model
11
+ )
12
+
13
+ # Example query Alfred might receive during the gala
14
+ if __name__ == "__main__":
15
+ question = "Tell me about our guest named 'Lady Ada Lovelace'."
16
+ response = alfred.run(question)
17
+
18
+ print("🎩 Alfred's Response:")
19
+ print(response)