wishmi1234 commited on
Commit
1b74e60
·
verified ·
1 Parent(s): 48d3633

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -0
app.py CHANGED
@@ -40,7 +40,21 @@ weather_info_tool = WeatherInfoTool()
40
 
41
  # # Initialize the Hub stats tool
42
  hub_stats_tool = HubStatsTool()
 
 
 
 
 
 
 
 
 
 
 
 
43
  guest_info_tool = GuestInfoRetrieverTool(docs)
 
 
44
  # # Load the guest dataset and initialize the guest info tool
45
  latest_news_tool = LatestNewsTool()
46
  # Create Alfred with all the tools
 
40
 
41
  # # Initialize the Hub stats tool
42
  hub_stats_tool = HubStatsTool()
43
+
44
+
45
+ from datasets import load_dataset
46
+ from langchain_core.documents import Document
47
+
48
+ # Load the dataset from Hugging Face
49
+ dataset = load_dataset("agents-course/unit3-invitees")["train"]
50
+
51
+ # Create Document objects from the "info" column
52
+ docs = [Document(page_content=row["description"]) for row in dataset]
53
+
54
+ # Initialize the tool
55
  guest_info_tool = GuestInfoRetrieverTool(docs)
56
+
57
+ # guest_info_tool = GuestInfoRetrieverTool(docs)
58
  # # Load the guest dataset and initialize the guest info tool
59
  latest_news_tool = LatestNewsTool()
60
  # Create Alfred with all the tools