Spaces:
Sleeping
Sleeping
Commit
·
ebfa5b6
1
Parent(s):
b602ff4
inti
Browse files
app.py
CHANGED
@@ -151,6 +151,16 @@ def main():
|
|
151 |
st.markdown("""
|
152 |
FormIQ uses LayoutLMv3 and Perplexity AI to extract and validate information from documents.
|
153 |
""")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
154 |
|
155 |
# Main content
|
156 |
uploaded_file = st.file_uploader(
|
@@ -194,15 +204,6 @@ def main():
|
|
194 |
logger.error(f"Error processing document: {str(e)}")
|
195 |
st.error(f"Error processing document: {str(e)}")
|
196 |
|
197 |
-
st.markdown("---")
|
198 |
-
st.header("💬 Receipt Chatbot")
|
199 |
-
st.write("Ask questions about your receipts stored in DynamoDB.")
|
200 |
-
user_question = st.text_input("Enter your question:", "What is the total amount paid?")
|
201 |
-
if st.button("Ask Chatbot"):
|
202 |
-
with st.spinner("Getting answer from Perplexity LLM..."):
|
203 |
-
answer = ask_receipt_chatbot(user_question)
|
204 |
-
st.success(answer)
|
205 |
-
|
206 |
st.header("Model Training & Evaluation Demo")
|
207 |
|
208 |
if st.button("Start Training"):
|
|
|
151 |
st.markdown("""
|
152 |
FormIQ uses LayoutLMv3 and Perplexity AI to extract and validate information from documents.
|
153 |
""")
|
154 |
+
|
155 |
+
# Receipt Chatbot in sidebar
|
156 |
+
st.markdown("---")
|
157 |
+
st.header("💬 Receipt Chatbot")
|
158 |
+
st.write("Ask questions about your receipts stored in DynamoDB.")
|
159 |
+
user_question = st.text_input("Enter your question:", "What is the total amount paid?")
|
160 |
+
if st.button("Ask Chatbot", key="sidebar_chatbot"):
|
161 |
+
with st.spinner("Getting answer from Perplexity LLM..."):
|
162 |
+
answer = ask_receipt_chatbot(user_question)
|
163 |
+
st.success(answer)
|
164 |
|
165 |
# Main content
|
166 |
uploaded_file = st.file_uploader(
|
|
|
204 |
logger.error(f"Error processing document: {str(e)}")
|
205 |
st.error(f"Error processing document: {str(e)}")
|
206 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
207 |
st.header("Model Training & Evaluation Demo")
|
208 |
|
209 |
if st.button("Start Training"):
|