Hello!
I started to train a deep learning module in:
“C:\Users\User\Documents\ml-basics”.
I set up a Flask in the same directory and ran it.
Everything was fine until I moved those files into a different directory:
“C:\Users\User”.
When I try to run the Flask now, all of a sudden, it gives me the Error:
“FileNotFoundError: [Errno 2] No such file or directory: ‘currency_pair_lstm_model.pth’”
The Flask.py file and the DeepLearning.ipynb file are in the same “C:\Users\User” directory.
I tried to check with the command in a .py file:
import os
file_name = ‘currency_pair_lstm_model.pth’
file_path = os.path.abspath(file_name)
print(f"The full path to the file is: {file_path}")
if os.path.exists(file_path):
print(f"The file exists at: {file_path}")
else:
print(“The file does not exist.”)
and got:
The full path to the file is: C:\Users\User\currency_pair_lstm_model.pth
The file does not exist.
What am I doing wrong`?
How come the path to the file can be found but the file itself does not exist??
Thank you!