trip-planner / app.py
Amitabhab's picture
Adding support for Sambanova_API_KEY
2582114
#!/usr/bin/env python
import sys
import gradio as gr
from crew import SurpriseTravelCrew
def run(origin, destination, age, trip_duration, children, budget):
# Replace with your inputs, it will automatically interpolate any tasks and agents information
inputs = {
'origin': origin,
'destination': destination,
'age': age,
'trip_duration': trip_duration,
'children': children,
'budget': budget
}
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),
gr.Checkbox(),
gr.Slider(value=100, minimum=20, maximum=1000, step=20)],
outputs=["text"],
)
demo.launch()