mirror of
https://github.com/Mobile-Robotics-W20-Team-9/UMICH-NCLT-SLAP.git
synced 2025-09-09 12:23:14 +00:00
improved messages withing the gui response and updated buildings model
This commit is contained in:
Binary file not shown.
@@ -6,6 +6,8 @@ lemmatizer = WordNetLemmatizer()
|
|||||||
import pickle
|
import pickle
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import spacy
|
import spacy
|
||||||
|
import tkinter
|
||||||
|
from tkinter import *
|
||||||
|
|
||||||
from keras.models import load_model
|
from keras.models import load_model
|
||||||
model = load_model('chatbot_model.h5')
|
model = load_model('chatbot_model.h5')
|
||||||
@@ -102,9 +104,6 @@ def getBuildingInfo(sentence):
|
|||||||
|
|
||||||
|
|
||||||
#Creating tkinter GUI
|
#Creating tkinter GUI
|
||||||
import tkinter
|
|
||||||
from tkinter import *
|
|
||||||
|
|
||||||
def send():
|
def send():
|
||||||
msgClean = EntryBox.get("1.0",'end-1c')
|
msgClean = EntryBox.get("1.0",'end-1c')
|
||||||
msg = msgClean.strip()
|
msg = msgClean.strip()
|
||||||
@@ -119,7 +118,7 @@ def send():
|
|||||||
global confirmation
|
global confirmation
|
||||||
if (ints[0]['intent'] == "yes" or ints[0]['intent'] == "no") and confirmation == 1:
|
if (ints[0]['intent'] == "yes" or ints[0]['intent'] == "no") and confirmation == 1:
|
||||||
if ints[0]['intent'] == "yes":
|
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":
|
elif ints[0]['intent'] == "no":
|
||||||
res = "Cancelled operation"
|
res = "Cancelled operation"
|
||||||
confirmation = 0
|
confirmation = 0
|
||||||
@@ -136,7 +135,7 @@ def send():
|
|||||||
currbuilding[1] = buildings[random.randint(0, len(buildings)-1)]
|
currbuilding[1] = buildings[random.randint(0, len(buildings)-1)]
|
||||||
fromBuild = predict_building(currbuilding[0])
|
fromBuild = predict_building(currbuilding[0])
|
||||||
toBuild = predict_building(currbuilding[1])
|
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
|
confirmation = 1
|
||||||
elif ints[0]['intent'] == "exit":
|
elif ints[0]['intent'] == "exit":
|
||||||
res = getResponse(ints, intents)
|
res = getResponse(ints, intents)
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{"intents": [
|
{"intents": [
|
||||||
{"tag": "Bob and Betty Beyster",
|
{"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"],
|
"responses": ["Bob and Betty Beyster"],
|
||||||
"context": [""]
|
"context": [""]
|
||||||
},
|
},
|
||||||
@@ -10,12 +10,12 @@
|
|||||||
"context": [""]
|
"context": [""]
|
||||||
},
|
},
|
||||||
{"tag": "FXB",
|
{"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"],
|
"responses": ["FXB"],
|
||||||
"context": [""]
|
"context": [""]
|
||||||
},
|
},
|
||||||
{"tag": "Electrical and Computer Engineering",
|
{"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"],
|
"responses": ["Electrical and Computer Engineering"],
|
||||||
"context": [""]
|
"context": [""]
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user