File size: 294 Bytes
5e7aca9
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
import gradio as gr
from your_chatbot_module import setup_qa  # adjust imports accordingly

qa_chain = setup_qa()

def chat_fn(query):
    response = qa_chain.invoke(query)
    return response['result']

gr.Interface(fn=chat_fn, inputs="text", outputs="text", title="Company Chatbot").launch()