Skip to content

Commit

Permalink
Update backend/modules/parsers/unstructured_io.py
Browse files Browse the repository at this point in the history
Co-authored-by: M N V Sai Krishna <[email protected]>
  • Loading branch information
S1LV3RJ1NX and mnvsk97 authored Nov 11, 2024
1 parent abf4786 commit c860df4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/modules/parsers/unstructured_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ async def get_chunks(self, filepath: str, metadata: dict, **kwargs):
parsed_data = response.json()
for payload in parsed_data:
text = payload["text"]
if text == None or len(text) == 0:
if not text:
continue
metadata = payload["metadata"]
final_texts.append(Document(page_content=text, metadata=metadata))
Expand Down

0 comments on commit c860df4

Please sign in to comment.