Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -33,10 +33,10 @@ def initialize_session_state():
|
|
33 |
st.session_state['history'] = []
|
34 |
|
35 |
if 'generated' not in st.session_state:
|
36 |
-
st.session_state['generated'] = ["Hello! Ask me anything
|
37 |
|
38 |
if 'past' not in st.session_state:
|
39 |
-
st.session_state['past'] = ["Hey!
|
40 |
|
41 |
def conversation_chat(query, chain, history):
|
42 |
result = chain({"question": query, "chat_history": history})
|
@@ -94,7 +94,7 @@ def main():
|
|
94 |
os.environ.get("REPLICATE_API_TOKEN")
|
95 |
# Initialize session state
|
96 |
initialize_session_state()
|
97 |
-
st.title("
|
98 |
loader = UnstructuredFileLoader('./Highway Traffic Act, R.S.O. 1990, c. H.8[465] - Copy.pdf')
|
99 |
documents = loader.load()
|
100 |
# documents = []
|
|
|
33 |
st.session_state['history'] = []
|
34 |
|
35 |
if 'generated' not in st.session_state:
|
36 |
+
st.session_state['generated'] = ["Hello! Ask me anything From Pdf's"]
|
37 |
|
38 |
if 'past' not in st.session_state:
|
39 |
+
st.session_state['past'] = ["Hey!"]
|
40 |
|
41 |
def conversation_chat(query, chain, history):
|
42 |
result = chain({"question": query, "chat_history": history})
|
|
|
94 |
os.environ.get("REPLICATE_API_TOKEN")
|
95 |
# Initialize session state
|
96 |
initialize_session_state()
|
97 |
+
st.title("Chat Docs CSA")
|
98 |
loader = UnstructuredFileLoader('./Highway Traffic Act, R.S.O. 1990, c. H.8[465] - Copy.pdf')
|
99 |
documents = loader.load()
|
100 |
# documents = []
|