rp1954's picture
Update app.py
4095d30 verified
import gradio as gr
def kwk_chatbot(question):
question = question.lower()
if "language" in question or "code" in question or "learn" in question:
return "You'll learn HTML, CSS, JavaScript, and Python at KWK camp!"
elif "length" in question or "long" in question or "how many days" in question:
return "Camp is typically two weeks long."
elif "experience" in question or "beginner" in question:
return "No experience? No problem! Camp is beginner-friendly."
elif "bring" in question or "pack" in question:
return "Everything is provided. But bring your curiosity!"
elif "capstone" in question:
return "The capstone project lets you build a website or app to show off what you've learned!"
elif "day" in question or "schedule" in question:
return "Each day includes tutorials, project time, and fun community activities."
elif "ia" in question or "instructor" in question:
return "Instructor Assistants are there to support you—they were once scholars too!"
elif "cost" in question or "pay" in question or "money" in question:
return "Every scholar comes for free so cost is never a barrier."
elif "friends" in question or "people" in question:
return "You’ll meet amazing people and often leave camp with lasting friendships."
elif "food" in question or "eat" in question or "snacks" in question:
return "Lunch and snacks are provided for in-person camps!"
else:
return "Great question! Try asking about what you’ll learn, bring, or do at camp."
chatbot = gr.Interface(
fn=kwk_chatbot,
inputs=gr.Textbox(label="Ask me anything about KWK camp!"),
outputs=gr.Textbox(label="KWK Bot says..."),
title="KWK Camp Chatbot",
description="I'm your friendly KWK bot. Ask about what to expect at Kode With Klossy camp!"
)
chatbot.launch()