improved messages withing the gui response and updated buildings model

This commit is contained in:
snbenge
2020-04-21 00:26:06 -04:00
parent 576bb8ef6d
commit 1f972d63af
3 changed files with 7 additions and 8 deletions

Binary file not shown.

View File

@@ -6,6 +6,8 @@ lemmatizer = WordNetLemmatizer()
import pickle
import numpy as np
import spacy
import tkinter
from tkinter import *
from keras.models import load_model
model = load_model('chatbot_model.h5')
@@ -102,9 +104,6 @@ def getBuildingInfo(sentence):
#Creating tkinter GUI
import tkinter
from tkinter import *
def send():
msgClean = EntryBox.get("1.0",'end-1c')
msg = msgClean.strip()
@@ -119,7 +118,7 @@ def send():
global confirmation
if (ints[0]['intent'] == "yes" or ints[0]['intent'] == "no") and confirmation == 1:
if ints[0]['intent'] == "yes":
res = "Starting navigation"
res = "Starting navigation. Please wait for process to complete. This may take a couple minutes."
elif ints[0]['intent'] == "no":
res = "Cancelled operation"
confirmation = 0
@@ -136,7 +135,7 @@ def send():
currbuilding[1] = buildings[random.randint(0, len(buildings)-1)]
fromBuild = predict_building(currbuilding[0])
toBuild = predict_building(currbuilding[1])
res = "You chose navigating to " + toBuild[0]['buildingIntents'] + " from " + fromBuild[0]['buildingIntents'] + ". Is this correct?"
res = "You chose navigating to " + toBuild[0]['buildingIntents'] + " building from " + fromBuild[0]['buildingIntents'] + " builing. Is this correct?"
confirmation = 1
elif ints[0]['intent'] == "exit":
res = getResponse(ints, intents)

View File

@@ -1,6 +1,6 @@
{"intents": [
{"tag": "Bob and Betty Beyster",
"patterns": ["BBB", "CSE", "CS","Computer Science", "Computer", "Bob", "Bob and Betty Beyster", "Betty"],
"patterns": ["BBB", "CSE", "CS","Computer Science", "Computer", "Bob", "Bob and Betty Beyster", "Betty", "Computer Science Department", "CS Department"],
"responses": ["Bob and Betty Beyster"],
"context": [""]
},
@@ -10,12 +10,12 @@
"context": [""]
},
{"tag": "FXB",
"patterns": ["FXB", "Francois-Xavier Bagnoud", "Aerospace", "Aerospace Engineering", "planes"],
"patterns": ["FXB", "Francois-Xavier Bagnoud", "Aerospace", "aerospace", "Aerospace Engineering", "planes", "Aerospace Department", "Aerospace Engineering Department"],
"responses": ["FXB"],
"context": [""]
},
{"tag": "Electrical and Computer Engineering",
"patterns": ["Electrical and Computer Engineering","Electrical", "Electrical Engineering", "Computer Engineering", "EECS", "ECE"],
"patterns": ["Electrical and Computer Engineering","Electrical", "Electrical Engineering", "Computer Engineering", "EECS", "ECE", "Electrical Engineering Department", "EECS Department", "ECE Department"],
"responses": ["Electrical and Computer Engineering"],
"context": [""]
},