File size: 547 Bytes
a8e7c75
 
f8cae87
 
 
a8e7c75
f8cae87
 
 
 
 
 
 
 
a8e7c75
f8cae87
 
a8e7c75
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import gradio as gr

# Simple chatbot response function
def chatbot_response(user_input):
    return f"You said: {user_input}"

# Gradio interface setup
with gr.Blocks() as demo:
    gr.Markdown("### Study Assistance Chatbot")
    user_input = gr.Textbox(label="Enter your question here:", placeholder="Type your question...")
    chatbot_output = gr.Textbox(label="Chatbot Response")
    submit_button = gr.Button("Submit")
    
    submit_button.click(chatbot_response, inputs=user_input, outputs=chatbot_output)

# Launch Gradio
demo.launch()