Skip to content

Commit 2d77945

Browse files
committed
Fix remove
1 parent 55148d5 commit 2d77945

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

main.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ def upload():
8686
file.save(os.path.join('uploads', filename))
8787
answers = nlp('uploads/' + filename, question)
8888
if len(answers) == 0:
89+
os.remove(os.path.join(os.getcwd(), 'uploads/' + filename))
8990
return 'Sorry, I can\'t find the answer for that question. Please try again with a different document.'
9091
answer = answers[0]
9192
os.remove(os.path.join(os.getcwd(), 'uploads/' + filename))

0 commit comments

Comments
 (0)