Spaces:
Sleeping
Sleeping
Tomas Larsson commited on
Commit ·
2efa2b1
1
Parent(s): b0b3ffc
changeorder
Browse files
app.py
CHANGED
|
@@ -17,7 +17,6 @@ import numpy as np
|
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
-
exec(open('start.py').read())
|
| 21 |
|
| 22 |
|
| 23 |
|
|
@@ -113,3 +112,10 @@ if submit_button:
|
|
| 113 |
|
| 114 |
else:
|
| 115 |
answer_placeholder.warning("Please type a question.")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
|
| 19 |
|
|
|
|
| 20 |
|
| 21 |
|
| 22 |
|
|
|
|
| 112 |
|
| 113 |
else:
|
| 114 |
answer_placeholder.warning("Please type a question.")
|
| 115 |
+
|
| 116 |
+
|
| 117 |
+
|
| 118 |
+
|
| 119 |
+
|
| 120 |
+
exec(open('start.py').read())
|
| 121 |
+
|
start.py
CHANGED
|
@@ -2,6 +2,8 @@ st.session_state.em = "0"
|
|
| 2 |
|
| 3 |
try:
|
| 4 |
if 'retriever' not in st.session_state:
|
|
|
|
|
|
|
| 5 |
global rag_chain, retriever, em
|
| 6 |
import requests
|
| 7 |
from langchain.document_loaders import TextLoader
|
|
|
|
| 2 |
|
| 3 |
try:
|
| 4 |
if 'retriever' not in st.session_state:
|
| 5 |
+
st.session_state.retriever = ""
|
| 6 |
+
st.session_state.rag_chain = ""
|
| 7 |
global rag_chain, retriever, em
|
| 8 |
import requests
|
| 9 |
from langchain.document_loaders import TextLoader
|