DeepQA
DeepQA copied to clipboard
reuse error when I tries to do another round prediction in daemon mode
In my structure I use flask server, and using "from chatbot import chatbot" to include the chatbot then I initial as below to perform predict
AkishinoProjectBot = chatbot.Chatbot()
AkishinoProjectBot.main(['--modelTag', 'taiwa20170709', '--test', 'daemon'])
# --modelTag taiwa20170709
# --test daemon
answer = AkishinoProjectBot.daemonPredict(sentence=sentence_in)
AkishinoProjectBot.daemonClose()
del AkishinoProjectBot
return answer
everything got well in my first round, but only works in the first. While I try after first round always got the error below.
ValueError: Variable embedding_rnn_seq2seq/rnn/embedding_wrapper/embedding already exists, disallowed. Did you mean to set reuse=True in VarScope?
Is there any solution can fixed this issue? Thanks. By the way I've also tries to fix it with reuse=None but did'n get anything works.
Try using "from main import chatbot" instead of "from chatbot import chatbot", this fixed the issue for me.
Much of Thanks, @nichcuta ! It works!!!