SumayyaAli commited on
Commit
0c332ef
1 Parent(s): 935b5e7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -67,10 +67,12 @@ def main():
67
  temp_file.flush() # Ensure contents are written to disk
68
  filepath = temp_file.name
69
 
70
- with col2:
71
- summary = llm_pipeline(filepath)
72
- st.info("Summarization Complete")
73
- st.success(summary)
 
 
74
  # Clean up the temporary file
75
  os.remove(filepath)
76
 
 
67
  temp_file.flush() # Ensure contents are written to disk
68
  filepath = temp_file.name
69
 
70
+
71
+ try:
72
+ summary = llm_pipeline(filepath)
73
+ st.success(summary) # Display only the summary
74
+ except Exception as e:
75
+ st.error(f"An error occurred during summarization: {e}")
76
  # Clean up the temporary file
77
  os.remove(filepath)
78