File size: 552 Bytes
a388107
 
c5f5a18
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import gradio as gr

# Function to interact with the model
def chatbot_response(input_text):
    # Here you would use your model for inference
    # This is a placeholder for your actual model's prediction logic
    response = f"Model Response: {input_text}"
    return response

# Create the Gradio interface
with gr.Blocks() as demo:
    chatbot = gr.Chatbot()
    with gr.Row():
        txt = gr.Textbox(show_label=False, placeholder="Enter text and press Enter").style(container=False)
    txt.submit(chatbot_response, txt, chatbot)

demo.launch()