File size: 279 Bytes
4d7c224
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

import gradio as gr 
import os 
from langchain_bot import chain 

chat_history=[]
def chat_messages(prompt,chat_history):
    response = chain.invoke({"question":prompt})
    return response['answer']

gr.ChatInterface(
    chat_messages
    ).launch(debug=True)