Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -102,6 +102,16 @@ precomputed_faq_answers = get_precomputed_answers()
|
|
| 102 |
# Streamlit UI
|
| 103 |
st.title('Mining Minerals Expert RAG App')
|
| 104 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 105 |
# Sidebar with FAQ Section
|
| 106 |
st.sidebar.subheader("Frequently Asked Questions")
|
| 107 |
# Initialize session state to store the selected question and answer
|
|
@@ -119,12 +129,4 @@ with faq_expander:
|
|
| 119 |
if st.session_state.faq_answer:
|
| 120 |
st.write(st.session_state.faq_answer)
|
| 121 |
|
| 122 |
-
|
| 123 |
-
st.subheader("Ask Your Own Question")
|
| 124 |
-
question = st.text_input('Write your question below:')
|
| 125 |
-
if st.button('Enter'):
|
| 126 |
-
if question:
|
| 127 |
-
answer = get_answer(question)
|
| 128 |
-
st.write(f"**Answer:** {answer}")
|
| 129 |
-
else:
|
| 130 |
-
st.write("Please enter a question.")
|
|
|
|
| 102 |
# Streamlit UI
|
| 103 |
st.title('Mining Minerals Expert RAG App')
|
| 104 |
|
| 105 |
+
# Custom Question Section
|
| 106 |
+
st.subheader("Ask Your Own Question")
|
| 107 |
+
question = st.text_input('Write your question below:')
|
| 108 |
+
if st.button('Enter'):
|
| 109 |
+
if question:
|
| 110 |
+
answer = get_answer(question)
|
| 111 |
+
st.write(f"**Answer:** {answer}")
|
| 112 |
+
else:
|
| 113 |
+
st.write("Please enter a question.")
|
| 114 |
+
|
| 115 |
# Sidebar with FAQ Section
|
| 116 |
st.sidebar.subheader("Frequently Asked Questions")
|
| 117 |
# Initialize session state to store the selected question and answer
|
|
|
|
| 129 |
if st.session_state.faq_answer:
|
| 130 |
st.write(st.session_state.faq_answer)
|
| 131 |
|
| 132 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|