Add os.unlink to process_text_file()
Browse files
app.py
CHANGED
@@ -69,6 +69,7 @@ def process_text_file(file: AskFileResponse):
|
|
69 |
else:
|
70 |
raise ValueError("Provide a .txt or .pdf file")
|
71 |
texts = text_splitter.split_texts(documents)
|
|
|
72 |
return texts
|
73 |
|
74 |
|
|
|
69 |
else:
|
70 |
raise ValueError("Provide a .txt or .pdf file")
|
71 |
texts = text_splitter.split_texts(documents)
|
72 |
+
os.unlink(temp_file_path)
|
73 |
return texts
|
74 |
|
75 |
|