Tonic commited on
Commit
6d5d07f
·
1 Parent(s): 2213377

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -142,7 +142,10 @@ claims_extracted = st.session_state.claims_extraction
142
  chunk_size = 350
143
 
144
  # Split the extracted claims into chunks
145
- chunks = [claims_extracted[i:i+chunk_size] for i in range(0, len(claims_extracted), chunk_size)]
 
 
 
146
 
147
  # Process each chunk with the BERT-based model
148
  summaries = []
 
142
  chunk_size = 350
143
 
144
  # Split the extracted claims into chunks
145
+ if isinstance(claims_extracted, str):
146
+ chunks = [claims_extracted[i:i+chunk_size] for i in range(0, len(claims_extracted), chunk_size)]
147
+ else:
148
+ chunks = []
149
 
150
  # Process each chunk with the BERT-based model
151
  summaries = []