Skip to content

Instantly share code, notes, and snippets.

@nesendal
Last active May 8, 2021 20:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nesendal/518ed803bd861dee91a8981c00913253 to your computer and use it in GitHub Desktop.
Save nesendal/518ed803bd861dee91a8981c00913253 to your computer and use it in GitHub Desktop.
Assistan
from neuralintents import GenericAssistant
import pandas_datareader as web
import sys
assistant = GenericAssistant('intents.json', model_name="test_model")
assistant.train_model()
assistant.save_model()
done = False
while not done:
message = input("Enter a message: ")
if message == "STOP":
done = True
else:
assistant.request(message)
{
"intents":
[
{"tag":"greeting",
"patterns":["Hi","How are you","Whats up"],
"responses":["Hello!","Good to see you again","Hi there, how can I help?"],
"context_set":""
},
{"tag":"goodbye",
"patterns":["cya","See you later","Goodbye"],
"responses":["Sad to see you go :( ","Goodbye!","Talk to you later"],
"context_set":""
}
]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment