Inference of .txt file type fails if the file has only whitespaces.
To Reproduce:
from tempfile import NamedTemporaryFile
from unstructured.partition.auto import partition
with NamedTemporaryFile(mode="w", suffix=".txt") as f:
f.write(" \n")
f.seek(0)
elements = partition(filename=f.name)
This is a fix for this bug.
Inference of .txt file type fails if the file has only whitespaces.
To Reproduce: