Update app.py
Browse files
app.py
CHANGED
@@ -55,7 +55,7 @@ def parse_output(output):
|
|
55 |
def run_program(place, duration, start, end):
|
56 |
|
57 |
prompt = f"""Please generate a list of key cities and attractions in each cities for the following place: {place} suitable for {duration}, starting from {start} and ending at {end}, as a json list of less than 10 dictionaries with the following keys: 'city', 'attraction' and 'description'.
|
58 |
-
ALWAYS write the city and country in the 'city'. For instance do not only "city": "Paris" as the city but "city": "Paris, France". Don't combine multiplpe locations in one element. In the 'description', write the main attractions in that city as well.
|
59 |
Try to minimize the distance between locations. Always think of the transportation means that you want to use, and the timing: morning, afternoon, where to sleep.
|
60 |
Strictly generate two sections: 'Itinerary:' provides a descriptive day-wise explanation of the itinerary formatted with bullet points, then you list the locations in 'Key points:'"""
|
61 |
|
@@ -90,7 +90,7 @@ with gr.Blocks(theme=gr.themes.Base(primary_hue=gr.themes.colors.green,secondary
|
|
90 |
placeholder="Ending location of your trip. Type 'anywhere' if you don't have a place in mind"
|
91 |
)
|
92 |
|
93 |
-
button = gr.Button("Generate
|
94 |
|
95 |
gr.Markdown("### Itinerary")
|
96 |
itinery, starting_map = run_program(dest, dur, start, end)
|
|
|
55 |
def run_program(place, duration, start, end):
|
56 |
|
57 |
prompt = f"""Please generate a list of key cities and attractions in each cities for the following place: {place} suitable for {duration}, starting from {start} and ending at {end}, as a json list of less than 10 dictionaries with the following keys: 'city', 'attraction' and 'description'.
|
58 |
+
In attraction, write the official name of the place so that it can be searched with geolocator. ALWAYS write the city and country in the 'city'. For instance do not only "city": "Paris" as the city but "city": "Paris, France". Don't combine multiplpe locations in one element. In the 'description', write the main attractions in that city as well.
|
59 |
Try to minimize the distance between locations. Always think of the transportation means that you want to use, and the timing: morning, afternoon, where to sleep.
|
60 |
Strictly generate two sections: 'Itinerary:' provides a descriptive day-wise explanation of the itinerary formatted with bullet points, then you list the locations in 'Key points:'"""
|
61 |
|
|
|
90 |
placeholder="Ending location of your trip. Type 'anywhere' if you don't have a place in mind"
|
91 |
)
|
92 |
|
93 |
+
button = gr.Button("Generate itinerary!")
|
94 |
|
95 |
gr.Markdown("### Itinerary")
|
96 |
itinery, starting_map = run_program(dest, dur, start, end)
|