Spaces:
Sleeping
Sleeping
Update app.py
Browse files6 unmodified lines789101011121314151617181920212223242526272829303132336 unmodified lines # Add more conditions for different queries here elif "supervised learning" in user_input.lower(): return "Supervised learning is a machine learning approach return "Supervised learning is a machine learning approach where models are trained using labeled data." # If no predefined match, ask for more clarification else: return "I'm here to assist with academic questions. Please specify what you'd like help with."
with gr.Blocks() as demo: gr.Markdown("### Study Assistance Chatbot") gr.Markdown("Welcome! Ask me anything related to your academic studies.") with gr.Row(): with gr.Column(): user_input = gr.Textbox(label="Enter your question here:") submit_button = gr.Button("Submit") with gr.Column(): chatbot_output = gr.Textbox(label="Chatbot Response", interactive=False) submit_button.click(chatbot_response, inputs=user_input, outputs=chatbot_output)
demo.launch()
app.py+21-1