Spaces:
Sleeping
Sleeping
File size: 1,596 Bytes
2d2f85e 5a3d0a6 2d2f85e |
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 29 30 |
import gradio as gr
# Function to handle user input and provide output
def get_popular_trend(activity):
trends = {
"coding": "Most popular coding languages right now are Python, JavaScript, and Go.",
"gaming": "Popular gaming titles include The Legend of Zelda: Tears of the Kingdom, Baldur's Gate 3, and Final Fantasy XVI.",
"reading": "Popular books are 'Fourth Wing' by Rebecca Yarros, 'Happy Place' by Emily Henry, and 'Iron Flame' by Rebecca Yarros.",
"movies": "Trending movies are 'Barbie', 'Oppenheimer', and 'Mission: Impossible – Dead Reckoning Part One'.",
"music": "Top songs include 'As It Was' by Harry Styles, 'Levitating' by Dua Lipa, and 'Bad Habits' by Ed Sheeran.",
"sports": "Popular sports right now are soccer, basketball, and tennis.",
"travel": "Trending travel destinations include Bali, Paris, and Tokyo.",
"tech": "Hot tech trends include AI advancements, electric vehicles, and quantum computing.",
"food": "Trending food items include sushi, tacos, and avocado toast.",
"fashion": "Current fashion trends include oversized blazers, chunky sneakers, and pastel colors."
}
return trends.get(activity.lower(), "Sorry, I don't have information on that activity right now.")
# Create the Gradio interface
iface = gr.Interface(
fn=get_popular_trend,
inputs="text",
outputs="text",
title="What's Popular Right Now?",
description="Input an activity (like coding, gaming, etc.), and get the latest popular trends!"
)
# Launch the interface
iface.launch() |