Karthikeyan commited on
Commit
708209c
·
1 Parent(s): aed11c4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -59,7 +59,7 @@ def upload_via_url(url):
59
  temp_file = tempfile.NamedTemporaryFile(suffix=file_extension, delete=False)
60
  temp_file.write(r.content)
61
  file_path = temp_file.name
62
- loader = UnstructuredFileLoader(file_path, strategy="fast")
63
  docs = loader.load()
64
  with open(file_path, mode="rb") as f:
65
  pass
 
59
  temp_file = tempfile.NamedTemporaryFile(suffix=file_extension, delete=False)
60
  temp_file.write(r.content)
61
  file_path = temp_file.name
62
+ loader = UnstructuredFileLoader(file_path, strategy="fast",post_processors=[clean_extra_whitespace])
63
  docs = loader.load()
64
  with open(file_path, mode="rb") as f:
65
  pass