Spaces:
Sleeping
Sleeping
Tomas Larsson commited on
Commit ·
b386bd9
1
Parent(s): 26e4d98
vs
Browse files
app.py
CHANGED
|
@@ -105,8 +105,8 @@ if submit_button:
|
|
| 105 |
if question: # Check if there is a question typed
|
| 106 |
# Process the question here (a placeholder answer is used in this example)
|
| 107 |
|
| 108 |
-
|
| 109 |
-
|
| 110 |
|
| 111 |
answer_placeholder.text(Awnser) # Display the answer
|
| 112 |
else:
|
|
|
|
| 105 |
if question: # Check if there is a question typed
|
| 106 |
# Process the question here (a placeholder answer is used in this example)
|
| 107 |
|
| 108 |
+
# Awnser = rag_chain.invoke(question)
|
| 109 |
+
# contexts = retriever.get_relevant_documents(question)
|
| 110 |
|
| 111 |
answer_placeholder.text(Awnser) # Display the answer
|
| 112 |
else:
|
start.py
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
|
|
|
|
|
| 1 |
try:
|
| 2 |
global rag_chain, retriever, em
|
| 3 |
import requests
|
|
@@ -100,4 +102,6 @@ try:
|
|
| 100 |
|
| 101 |
em = "aaa"
|
| 102 |
except Exception as e:
|
| 103 |
-
em = "bbb" + str(e)
|
|
|
|
|
|
|
|
|
| 1 |
+
st.session_state.em = "0"
|
| 2 |
+
|
| 3 |
try:
|
| 4 |
global rag_chain, retriever, em
|
| 5 |
import requests
|
|
|
|
| 102 |
|
| 103 |
em = "aaa"
|
| 104 |
except Exception as e:
|
| 105 |
+
em = "bbb " + str(e)
|
| 106 |
+
|
| 107 |
+
st.session_state.em = em
|