|
import gradio as gr |
|
from generate.py import generate_response |
|
|
|
def chat_with_evo(user_input): |
|
response = generate_response(user_input) |
|
return response |
|
|
|
with gr.Blocks() as demo: |
|
gr.Markdown("## 🤖 EvoDecoder Chatbot (Lightweight Conversational AI)") |
|
with gr.Row(): |
|
with gr.Column(scale=4): |
|
user_input = gr.Textbox(label="Ask Evo anything...", placeholder="Type your question here...") |
|
submit_btn = gr.Button("Submit") |
|
with gr.Column(scale=6): |
|
response_output = gr.Textbox(label="Evo's Response") |
|
|
|
submit_btn.click(fn=chat_with_evo, inputs=user_input, outputs=response_output) |
|
|
|
demo.launch() |
|
|