Paula Leonova
commited on
Commit
·
3d4d8f3
1
Parent(s):
89f1955
Update display for summary table
Browse files
app.py
CHANGED
@@ -215,8 +215,8 @@ if submit_button or example_button:
|
|
215 |
final_summary = "\n\n".join(list(summary))
|
216 |
sum_dict[key] = [final_summary]
|
217 |
|
218 |
-
sum_df = pd.DataFrame.from_dict(sum_dict).reset_index()
|
219 |
-
|
220 |
|
221 |
st.dataframe(sum_df)
|
222 |
st.download_button(
|
@@ -226,8 +226,8 @@ if submit_button or example_button:
|
|
226 |
mime='title_summary/csv',
|
227 |
)
|
228 |
|
229 |
-
if (len(text_input) == 0 or
|
230 |
-
or
|
231 |
st.error('Enter some text and at least one possible topic to see label predictions.')
|
232 |
else:
|
233 |
st.markdown("### Top Label Predictions on Summary vs Full Text")
|
|
|
215 |
final_summary = "\n\n".join(list(summary))
|
216 |
sum_dict[key] = [final_summary]
|
217 |
|
218 |
+
sum_df = pd.DataFrame.from_dict(sum_dict).T.reset_index()
|
219 |
+
sum_df.columns = ['title', 'summary_text']
|
220 |
|
221 |
st.dataframe(sum_df)
|
222 |
st.download_button(
|
|
|
226 |
mime='title_summary/csv',
|
227 |
)
|
228 |
|
229 |
+
if ((len(text_input) == 0 and uploaded_text_files is None or uploaded_csv_text_files is None)
|
230 |
+
or (len(labels) == 0 and uploaded_labels_file is None)):
|
231 |
st.error('Enter some text and at least one possible topic to see label predictions.')
|
232 |
else:
|
233 |
st.markdown("### Top Label Predictions on Summary vs Full Text")
|