Wazzever commited on
Commit
f974f1f
·
verified ·
1 Parent(s): f62ed74

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +40 -9
app.py CHANGED
@@ -1,4 +1,44 @@
1
  import streamlit as st
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
 
3
 
4
  warnings.filterwarnings("ignore", category=DeprecationWarning, module="langchain_community")
@@ -348,13 +388,4 @@ def handle_user_input(user_input):
348
  ai_response, error_message = get_ai_response(user_input)
349
  st.write(f"{ai_response}")
350
 
351
- # Streamlit app layout
352
- st.title("🦜🔗 Reminder AI")
353
-
354
- with st.form("reminder_form"):
355
- user_input = st.text_area("Enter your request:")
356
- submit_button = st.form_submit_button("Submit")
357
-
358
- if submit_button and user_input:
359
- handle_user_input(user_input)
360
 
 
1
  import streamlit as st
2
+ from langchain_core.prompts import ChatPromptTemplate
3
+ from langchain_core.pydantic_v1 import BaseModel, Field
4
+ from typing import List, Optional
5
+ from langchain_core.prompts import ChatPromptTemplate
6
+ import warnings
7
+ import json
8
+ from langchain_chroma import Chroma
9
+ from langchain_community.embeddings import HuggingFaceEmbeddings
10
+ from langchain_text_splitters import RecursiveCharacterTextSplitter
11
+ from langchain_core.prompts import ChatPromptTemplate
12
+ from langchain_core.output_parsers import StrOutputParser
13
+ from langchain_core.runnables import RunnablePassthrough
14
+ from langchain_core.documents import Document
15
+ import os
16
+ from datetime import datetime
17
+ from langchain_core.prompts import ChatPromptTemplate, MessagesPlaceholder
18
+ from langchain_core.runnables import RunnableParallel
19
+ from langchain_groq import ChatGroq
20
+ from langchain_community.chat_message_histories import SQLChatMessageHistory
21
+ from langchain_core.runnables import ConfigurableFieldSpec
22
+ from langchain_core.messages import HumanMessage
23
+ from langchain_core.runnables.history import RunnableWithMessageHistory
24
+ from langchain_core.documents import Document
25
+ from langchain_core.runnables import RunnablePassthrough
26
+ from langchain_huggingface import HuggingFaceEmbeddings
27
+ from langchain_community.utilities import SQLDatabase
28
+ import pytz
29
+ import sqlite3
30
+ import tqdm
31
+
32
+ # Streamlit app layout
33
+ st.title("🦜🔗 Reminder AI")
34
+
35
+ with st.form("reminder_form"):
36
+ user_input = st.text_area("Enter your request:")
37
+ submit_button = st.form_submit_button("Submit")
38
+
39
+ if submit_button and user_input:
40
+ handle_user_input(user_input)
41
+
42
 
43
 
44
  warnings.filterwarnings("ignore", category=DeprecationWarning, module="langchain_community")
 
388
  ai_response, error_message = get_ai_response(user_input)
389
  st.write(f"{ai_response}")
390
 
 
 
 
 
 
 
 
 
 
391