Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -41,8 +41,16 @@ with st.sidebar:
|
|
| 41 |
|
| 42 |
# Extract text from Textract
|
| 43 |
cleaned_up_body = extract_text_from_textract_blocks(result_dict['body'])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
|
| 45 |
-
# Add some space at the bottom of the sidebar
|
| 46 |
st.sidebar.markdown("<br><br><br><br>", unsafe_allow_html=True)
|
| 47 |
|
| 48 |
# Clear session button at the bottom of the sidebar
|
|
|
|
| 41 |
|
| 42 |
# Extract text from Textract
|
| 43 |
cleaned_up_body = extract_text_from_textract_blocks(result_dict['body'])
|
| 44 |
+
|
| 45 |
+
# Display JSON body in the sidebar inside an expander (default not expanded)
|
| 46 |
+
with st.expander("View JSON Body", expanded=False):
|
| 47 |
+
st.json(result_dict)
|
| 48 |
+
|
| 49 |
+
# Display cleaned-up body (text extracted from JSON) in the sidebar inside an expander (default not expanded)
|
| 50 |
+
with st.expander("View Cleaned-up Text", expanded=False):
|
| 51 |
+
st.text(cleaned_up_body)
|
| 52 |
|
| 53 |
+
# Add some space at the bottom of the sidebar before the "Clear Session" button
|
| 54 |
st.sidebar.markdown("<br><br><br><br>", unsafe_allow_html=True)
|
| 55 |
|
| 56 |
# Clear session button at the bottom of the sidebar
|