File size: 871 Bytes
488b328
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
62eb936
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env python
import sys
import gradio as gr
from crew import SurpriseTravelCrew


def run(origin, destination, age, trip_duration):
    # Replace with your inputs, it will automatically interpolate any tasks and agents information
    inputs = {
        'origin': origin,
        'destination': destination,
        'age': age,
        'trip_duration': trip_duration 
    }
    result = SurpriseTravelCrew().crew().kickoff(inputs=inputs)
    return (result)


demo = gr.Interface(
    title="Plan your itinerary with the help of AI",
    description="Use this app to create a detailed itinerary on how to explore a new place. Itinerary is customized to your taste",
    fn=run,
    inputs=["text", "text", gr.Slider(value=30, minimum=15, maximum=90, step=5), 
            gr.Slider(value=5, minimum=1, maximum=14, step=1)],
    outputs=["text"],
)
demo.launch()