Commit
472a486
1 Parent(s): 0ca4609

Update app.py (#2)

Browse files

- Update app.py (816ef14c7033b51294e64721b22f9752aa352132)


Co-authored-by: Marcelo Moreno <[email protected]>

Files changed (1) hide show
  1. app.py +11 -0
app.py CHANGED
@@ -15,10 +15,21 @@ def main():
15
  st.markdown("This app summarizes Whatsapp chats and provides named entity recognition as well as sentiment analysis for the conversation")
16
  st.markdown("**NOTE**: *This app can only receive chats downloaded from IOS as the downloaded chat format is different than from Android.*")
17
  st.markdown("Download your whatsapp chat by going to Settings > Chats > Export Chat and there select the chat you want to summarize (download 'Without Media').")
 
 
 
 
 
 
 
 
 
 
18
 
19
 
20
  # File uploader
21
  uploaded_file = st.file_uploader("Choose a file (.zip)", type=['zip'])
 
22
  if uploaded_file is not None:
23
  file_type = detect_file_type(uploaded_file.name)
24
  if file_type == "zip":
 
15
  st.markdown("This app summarizes Whatsapp chats and provides named entity recognition as well as sentiment analysis for the conversation")
16
  st.markdown("**NOTE**: *This app can only receive chats downloaded from IOS as the downloaded chat format is different than from Android.*")
17
  st.markdown("Download your whatsapp chat by going to Settings > Chats > Export Chat and there select the chat you want to summarize (download 'Without Media').")
18
+
19
+ st.markdown("**Example Files**: Download example zip files to test the app:")
20
+ example_files = {
21
+ "Example 1": "example1.zip",
22
+ "Example 2": "example2.zip",
23
+ "Example 3": "example3.zip"
24
+ }
25
+ for name, file in example_files.items():
26
+ with open(file, "rb") as f:
27
+ st.download_button(label=name, data=f, file_name=file, mime="application/zip")
28
 
29
 
30
  # File uploader
31
  uploaded_file = st.file_uploader("Choose a file (.zip)", type=['zip'])
32
+
33
  if uploaded_file is not None:
34
  file_type = detect_file_type(uploaded_file.name)
35
  if file_type == "zip":