Spaces:
Running
Running
Adding support for Sambanova_API_KEY
Browse filesAdding support for a budget and requesting option for number of children
- app.py +7 -3
- config/tasks.yaml +13 -6
- crew.py +0 -2
app.py
CHANGED
@@ -4,13 +4,15 @@ import gradio as gr
|
|
4 |
from crew import SurpriseTravelCrew
|
5 |
|
6 |
|
7 |
-
def run(origin, destination, age, trip_duration):
|
8 |
# Replace with your inputs, it will automatically interpolate any tasks and agents information
|
9 |
inputs = {
|
10 |
'origin': origin,
|
11 |
'destination': destination,
|
12 |
'age': age,
|
13 |
-
'trip_duration': trip_duration
|
|
|
|
|
14 |
}
|
15 |
result = SurpriseTravelCrew().crew().kickoff(inputs=inputs)
|
16 |
return (result)
|
@@ -21,7 +23,9 @@ demo = gr.Interface(
|
|
21 |
description="Use this app to create a detailed itinerary on how to explore a new place. Itinerary is customized to your taste",
|
22 |
fn=run,
|
23 |
inputs=["text", "text", gr.Slider(value=30, minimum=15, maximum=90, step=5),
|
24 |
-
gr.Slider(value=5, minimum=1, maximum=14, step=1)
|
|
|
|
|
25 |
outputs=["text"],
|
26 |
)
|
27 |
demo.launch()
|
|
|
4 |
from crew import SurpriseTravelCrew
|
5 |
|
6 |
|
7 |
+
def run(origin, destination, age, trip_duration, children, budget):
|
8 |
# Replace with your inputs, it will automatically interpolate any tasks and agents information
|
9 |
inputs = {
|
10 |
'origin': origin,
|
11 |
'destination': destination,
|
12 |
'age': age,
|
13 |
+
'trip_duration': trip_duration,
|
14 |
+
'children': children,
|
15 |
+
'budget': budget
|
16 |
}
|
17 |
result = SurpriseTravelCrew().crew().kickoff(inputs=inputs)
|
18 |
return (result)
|
|
|
23 |
description="Use this app to create a detailed itinerary on how to explore a new place. Itinerary is customized to your taste",
|
24 |
fn=run,
|
25 |
inputs=["text", "text", gr.Slider(value=30, minimum=15, maximum=90, step=5),
|
26 |
+
gr.Slider(value=5, minimum=1, maximum=14, step=1),
|
27 |
+
gr.Checkbox(),
|
28 |
+
gr.Slider(value=100, minimum=20, maximum=1000, step=20)],
|
29 |
outputs=["text"],
|
30 |
)
|
31 |
demo.launch()
|
config/tasks.yaml
CHANGED
@@ -4,20 +4,22 @@ personalized_activity_planning_task:
|
|
4 |
Focus on activities and events that match the traveler's interests and age group.
|
5 |
Utilize internet search tools and recommendation engines to gather the information.
|
6 |
|
7 |
-
|
8 |
Traveler's information:
|
9 |
|
10 |
-
|
11 |
- origin: {origin}
|
12 |
|
13 |
- destination: {destination}
|
14 |
|
15 |
-
- age of the
|
|
|
|
|
16 |
|
17 |
- how long is the trip: {trip_duration}
|
|
|
|
|
18 |
expected_output: >
|
19 |
A list of recommended activities and events for each day of the trip.
|
20 |
-
Each entry should include the activity name, location, a brief description, and why it's suitable for the traveler.
|
21 |
The location should have the full address so that it can be easily found using a map.
|
22 |
And potential reviews and ratings of the activities.
|
23 |
|
@@ -27,6 +29,7 @@ restaurant_scenic_location_scout_task:
|
|
27 |
Recommend scenic locations and fun activities that align with the traveler's preferences.
|
28 |
Use internet search tools, restaurant review sites, and travel guides.
|
29 |
Make sure to find a variety of options to suit different tastes and budgets, and ratings for them.
|
|
|
30 |
|
31 |
Traveler's information:
|
32 |
|
@@ -37,15 +40,19 @@ restaurant_scenic_location_scout_task:
|
|
37 |
- age of the traveler: {age}
|
38 |
|
39 |
- how long is the trip: {trip_duration}
|
|
|
|
|
40 |
expected_output: >
|
41 |
A list of recommended restaurants for each day of the trip.
|
42 |
-
Each entry should include the name, location
|
43 |
|
44 |
itinerary_compilation_task:
|
45 |
description: >
|
46 |
Compile all researched information into a comprehensive day-by-day itinerary for the trip to {destination}.
|
47 |
Ensure the itinerary integrates hotel information and all planned activities and dining experiences.
|
|
|
48 |
Use text formatting and document creation tools to organize the information.
|
|
|
49 |
expected_output: >
|
50 |
A detailed itinerary document, the itinerary should include a day-by-day
|
51 |
-
plan with activities, restaurants, and scenic locations. A day can contain multiple activities. In such a case a recommened mode of transport should be provided to help move from one activity location to another.
|
|
|
4 |
Focus on activities and events that match the traveler's interests and age group.
|
5 |
Utilize internet search tools and recommendation engines to gather the information.
|
6 |
|
|
|
7 |
Traveler's information:
|
8 |
|
|
|
9 |
- origin: {origin}
|
10 |
|
11 |
- destination: {destination}
|
12 |
|
13 |
+
- Approximate age of the adult travelers: {age}
|
14 |
+
|
15 |
+
- Are children accompanying the trip: {children}
|
16 |
|
17 |
- how long is the trip: {trip_duration}
|
18 |
+
|
19 |
+
- budget per day in dollars: {budget}
|
20 |
expected_output: >
|
21 |
A list of recommended activities and events for each day of the trip.
|
22 |
+
Each entry should include the activity name, location including a , a brief description, and why it's suitable for the traveler.
|
23 |
The location should have the full address so that it can be easily found using a map.
|
24 |
And potential reviews and ratings of the activities.
|
25 |
|
|
|
29 |
Recommend scenic locations and fun activities that align with the traveler's preferences.
|
30 |
Use internet search tools, restaurant review sites, and travel guides.
|
31 |
Make sure to find a variety of options to suit different tastes and budgets, and ratings for them.
|
32 |
+
Extract the address of he restaurant so that the same can be displayed to the user.
|
33 |
|
34 |
Traveler's information:
|
35 |
|
|
|
40 |
- age of the traveler: {age}
|
41 |
|
42 |
- how long is the trip: {trip_duration}
|
43 |
+
|
44 |
+
- budget per day in dollars: {budget}
|
45 |
expected_output: >
|
46 |
A list of recommended restaurants for each day of the trip.
|
47 |
+
Each entry should include the name, location including a detailed address, type of cuisine or activity, and a brief description and ratings.
|
48 |
|
49 |
itinerary_compilation_task:
|
50 |
description: >
|
51 |
Compile all researched information into a comprehensive day-by-day itinerary for the trip to {destination}.
|
52 |
Ensure the itinerary integrates hotel information and all planned activities and dining experiences.
|
53 |
+
Make sure that you do not recommend the same restaurant for both lunch and dinner.
|
54 |
Use text formatting and document creation tools to organize the information.
|
55 |
+
Do a great job so that you can be proud of your work.
|
56 |
expected_output: >
|
57 |
A detailed itinerary document, the itinerary should include a day-by-day
|
58 |
+
plan with activities, restaurants, and scenic locations. Include the address for each location so that an user can easily go to the address. A day can contain multiple activities. In such a case a recommened mode of transport should be provided to help move from one activity location to another.
|
crew.py
CHANGED
@@ -10,7 +10,6 @@ from crewai_tools import SerperDevTool, ScrapeWebsiteTool
|
|
10 |
from typing import List, Optional
|
11 |
|
12 |
import os
|
13 |
-
|
14 |
llm = LLM(model="sambanova/Meta-Llama-3.1-70B-Instruct")
|
15 |
|
16 |
"""
|
@@ -70,7 +69,6 @@ class SurpriseTravelCrew():
|
|
70 |
config=self.agents_config['itinerary_compiler'],
|
71 |
llm=llm,
|
72 |
max_iter=1,
|
73 |
-
tools=[SerperDevTool()],
|
74 |
verbose=True,
|
75 |
allow_delegation=False,
|
76 |
)
|
|
|
10 |
from typing import List, Optional
|
11 |
|
12 |
import os
|
|
|
13 |
llm = LLM(model="sambanova/Meta-Llama-3.1-70B-Instruct")
|
14 |
|
15 |
"""
|
|
|
69 |
config=self.agents_config['itinerary_compiler'],
|
70 |
llm=llm,
|
71 |
max_iter=1,
|
|
|
72 |
verbose=True,
|
73 |
allow_delegation=False,
|
74 |
)
|