dfasd
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -19,12 +19,10 @@ load_dotenv()
|
|
19 |
|
20 |
OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")
|
21 |
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
retrieval_qa_chat_prompt = hub.pull("langchain-ai/retrieval-qa-chat")
|
27 |
-
llm = ChatOpenAI(api_key=OPENAI_API_KEY)
|
28 |
|
29 |
vectordb_path = "./vector_db"
|
30 |
|
@@ -114,7 +112,7 @@ def dbcreate():
|
|
114 |
import gradio as gr
|
115 |
chatbot = gr.Chatbot(avatar_images=["user.png", "bot.jpg"], height=600)
|
116 |
clear_but = gr.Button(value="Clear Chat")
|
117 |
-
demo = gr.ChatInterface(fn=
|
118 |
|
119 |
if __name__ == "__main__":
|
120 |
demo.launch(debug=True)
|
|
|
19 |
|
20 |
OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")
|
21 |
|
22 |
+
# text_splitter = CharacterTextSplitter(separator = "\n", chunk_size=1000, chunk_overlap=200, length_function = len)
|
23 |
+
# embeddings = OpenAIEmbeddings(api_key=OPENAI_API_KEY)
|
24 |
+
# retrieval_qa_chat_prompt = hub.pull("langchain-ai/retrieval-qa-chat")
|
25 |
+
# llm = ChatOpenAI(api_key=OPENAI_API_KEY)
|
|
|
|
|
26 |
|
27 |
vectordb_path = "./vector_db"
|
28 |
|
|
|
112 |
import gradio as gr
|
113 |
chatbot = gr.Chatbot(avatar_images=["user.png", "bot.jpg"], height=600)
|
114 |
clear_but = gr.Button(value="Clear Chat")
|
115 |
+
demo = gr.ChatInterface(fn="", title="Mediate.com Chatbot Prototype", multimodal=False, retry_btn=None, undo_btn=None, clear_btn=clear_but, chatbot=chatbot)
|
116 |
|
117 |
if __name__ == "__main__":
|
118 |
demo.launch(debug=True)
|