Closed pynchmeister closed 5 years ago
You are probably using Python 3 and this project uses Python 2. The comparison operator <> has been removed from Python 3, you should replace it by != along this code.
See: https://stackoverflow.com/questions/40211270/is-there-a-difference-between-and-operators-in-python
Thank you very much!
Although I exceedingly appreciate the previous message's guidance, I have ran into another issue after invoking python2:
Using TensorFlow backend.
Starting the model...
Traceback (most recent call last):
File "conversation.py", line 136, in
Any ideas?
In the meantime I'll give Theano a whirl...
The backend is Theano.
@pynchmeister - Do not use spaces in any of the names ---
Example:
for the the context text
use the-context-text
Hello.
I am attempting to chat with the pre-trained model. I have downloaded the files from the dropbox, then I go to the directory for this cloned git and then I run conversation.py
I continue to get this error:
File "/Users/harrislevine/Downloads/Seq2seq-Chatbot-for-Keras-master-2/conversation.py", line 96 if raw_word[-1] <> '!' and raw_word[-1] <> '?' and raw_word[-1] <> '.' and raw_word[-2:] <> '! ' and raw_word[-2:] <> '? ' and raw_word[-2:] <> '. ': ^ SyntaxError: invalid syntax Harriss-MacBook-Pro:~ harrislevine$ cd /Users/harrislevine/Downloads/Seq2seq-Chatbot-for-Keras-master-2 Harriss-MacBook-Pro:Seq2seq-Chatbot-for-Keras-master-2 harrislevine$ python /Users/harrislevine/Downloads/Seq2seq-Chatbot-for-Keras-master-2/conversation.py File "/Users/harrislevine/Downloads/Seq2seq-Chatbot-for-Keras-master-2/conversation.py", line 96 if raw_word[-1] <> '!' and raw_word[-1] <> '?' and raw_word[-1] <> '.' and raw_word[-2:] <> '! ' and raw_word[-2:] <> '? ' and raw_word[-2:] <> '. ': ^ SyntaxError: invalid syntax Harriss-MacBook-Pro:Seq2seq-Chatbot-for-Keras-master-2 harrislevine$
If anyone can point out where I am going wrong it would be much appreciated...