itinerrary / app.py
Pengi5659's picture
Create app.py
ce5d446 verified
raw
history blame contribute delete
768 Bytes
import gradio as gr
def travel_bot(destination, budget, interests):
itinerary = f"You’re heading to {destination}! "
if budget.lower() == "luxury":
itinerary += "Enjoy 5-star accommodations and fine dining. "
elif budget.lower() == "budget":
itinerary += "Affordable stays and local eats are a great choice. "
itinerary += f"We’ll include activities based on your interests in {interests}. Get ready for an adventure!"
return itinerary
# Create Gradio chatbot
iface = gr.Interface(
fn=travel_bot,
inputs=["text", "text", "text"],
outputs="text",
title="Personalized Travel Itinerary Bot",
description="Enter destination, budget, and interests to get a personalized itinerary!"
)
iface.launch()