Update app.py
Browse files
app.py
CHANGED
|
@@ -192,6 +192,7 @@ with st.form(key='columns_in_form'):
|
|
| 192 |
selections.append(col.selectbox(f'Make a Selection', choices, key=i))
|
| 193 |
submitted = st.form_submit_button('Submit')
|
| 194 |
if submitted:
|
|
|
|
| 195 |
selections = [i for i in selections if i is not None]
|
| 196 |
with st.spinner(text="Digesting...please wait, this will take a few moments...Maybe check some messages or start reading the latest papers on summarization with transformers...."):
|
| 197 |
chosen = []
|
|
@@ -205,7 +206,7 @@ with st.form(key='columns_in_form'):
|
|
| 205 |
|
| 206 |
# Digestor uses 'chosen' to create digest.
|
| 207 |
# 'user_choicese' is passed for reference.
|
| 208 |
-
digestor = Digestor(timer=Timer(), cache = USE_CACHE, stubs=chosen, user_choices=
|
| 209 |
# happens internally but may be used differently so it isn't automatic upon digestor creation.
|
| 210 |
# Easily turn caching off for testing.
|
| 211 |
digestor.digest() # creates summaries and stores them associated with the digest
|
|
@@ -220,6 +221,7 @@ with st.form(key='columns_in_form'):
|
|
| 220 |
st.write("No text to return...huh.")
|
| 221 |
else:
|
| 222 |
st.write("Your digest is ready:\n")
|
|
|
|
| 223 |
|
| 224 |
st.write(digestor.text)
|
| 225 |
|
|
|
|
| 192 |
selections.append(col.selectbox(f'Make a Selection', choices, key=i))
|
| 193 |
submitted = st.form_submit_button('Submit')
|
| 194 |
if submitted:
|
| 195 |
+
st.write("Submitted")
|
| 196 |
selections = [i for i in selections if i is not None]
|
| 197 |
with st.spinner(text="Digesting...please wait, this will take a few moments...Maybe check some messages or start reading the latest papers on summarization with transformers...."):
|
| 198 |
chosen = []
|
|
|
|
| 206 |
|
| 207 |
# Digestor uses 'chosen' to create digest.
|
| 208 |
# 'user_choicese' is passed for reference.
|
| 209 |
+
digestor = Digestor(timer=Timer(), cache = USE_CACHE, stubs=chosen, user_choices=selections)
|
| 210 |
# happens internally but may be used differently so it isn't automatic upon digestor creation.
|
| 211 |
# Easily turn caching off for testing.
|
| 212 |
digestor.digest() # creates summaries and stores them associated with the digest
|
|
|
|
| 221 |
st.write("No text to return...huh.")
|
| 222 |
else:
|
| 223 |
st.write("Your digest is ready:\n")
|
| 224 |
+
st.write(f"{len(digestor.text)}")
|
| 225 |
|
| 226 |
st.write(digestor.text)
|
| 227 |
|