Closed Ashwinneogi closed 3 years ago
I've been trying to implement your code. However, it gives me a "file not found" error. The path of the file in the error seemed to be incorrect.
Yes. The code assumes you are running the scrip in the top-level directory. If you are, then the model/unison-ekman-mc.h5
should work as a relative path to the model. Please check the current working directory (e.g. with os.getcwd()
; see more).
I changed the path of the file in below code in emotion_predictor.py to the correct path
In theory that should work. Not really sure why it doesn't. Did you double check that the newly constructed path is OK? Also, keep in mind you'll also need to edit the allowed-chars.pkl path, if you're going down this road.
Hello, Thanks for the prompt reply.
The script is indeed running in the top-level directory. Infact I have set the path manually as well as shown below
import sys
sys.path.append('/content/twitter-emotion-recognition-master')
Yes, as what you told, it should work as a relative path but it isn't and I am not sure why.
The other option of constructing a new path also gave me the same error. However, what is surprising is that when I choose to construct/change the path on my own in the emotion_predictor.py . The changed path should display in the error message. For example, In the emotion_predictor.py I changed the path to:
self._loaded_model_filename = '/content/twitter-emotion-recognition-master/models/{}{}-{}.h5'
and I should expect this path to be displayed in the error message. Please see the screenshot below.
It looks like the name parameter is directed to somewhere else? I am really not sure.
Thanks for you time!
@Ashwinneogi it seems like the place where you execute the code on the left, is not picking up the edits you are making in the file on the right. Can you try running the emotion_predictior.py
directly in the command line?
@nikicc I ran the code directly and it seems to not have any problems.
@Ashwinneogi happy to hear this. Yes, I assumed it's something with the way the code is run. I'm closing this issue as it does not seem to be an actual code issue.
Hi,
I've been trying to implement your code. However, it gives me a "file not found" error. The path of the file in the error seemed to be incorrect. According to my understanding, I changed the path of the file in below code in emotion_predictor.py to the correct path
However, it still gives the same error with the earlier path name.
Please see the screenshot. Any help would be much appreciated