Update machine_learning.py
Browse files- machine_learning.py +10 -22
machine_learning.py
CHANGED
@@ -53,7 +53,11 @@ def convert_to_list(file):
|
|
53 |
|
54 |
return question,ans
|
55 |
|
56 |
-
def addQuestion(file
|
|
|
|
|
|
|
|
|
57 |
temp_ques = {}
|
58 |
temp_ans = {}
|
59 |
|
@@ -68,27 +72,11 @@ ml_data = {}
|
|
68 |
ans_data = {}
|
69 |
|
70 |
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
#addQuestion('/opt/homebrew/anaconda3/envs/tensorflow/Chatbot/question files/tell me about yourself.txt','tell me about yourself')
|
77 |
-
#addQuestion('/opt/homebrew/anaconda3/envs/tensorflow/Chatbot/question files/what language python.txt','what language python')
|
78 |
-
#addQuestion('/opt/homebrew/anaconda3/envs/tensorflow/Chatbot/question files/What is AI.txt', 'what is ai')
|
79 |
-
#addQuestion('/opt/homebrew/anaconda3/envs/tensorflow/Chatbot/question files/Tell me a joke.txt','tell me a joke')
|
80 |
-
#addQuestion('/opt/homebrew/anaconda3/envs/tensorflow/Chatbot/question files/you are stupid.txt', 'you are stupid')
|
81 |
-
#addQuestion('/opt/homebrew/anaconda3/envs/tensorflow/Chatbot/question files/Pollak Library.txt','pollak library')
|
82 |
-
#addQuestion('/opt/homebrew/anaconda3/envs/tensorflow/Chatbot/question files/Where is the building.txt','where is the building')
|
83 |
-
#addQuestion('/opt/homebrew/anaconda3/envs/tensorflow/Chatbot/question files/hungry.txt','hungry')
|
84 |
-
#addQuestion('/opt/homebrew/anaconda3/envs/tensorflow/Chatbot/question files/What is your major.txt','what is your major')
|
85 |
-
#addQuestion('/opt/homebrew/anaconda3/envs/tensorflow/Chatbot/question files/free time.txt', 'free time')
|
86 |
-
#addQuestion('/opt/homebrew/anaconda3/envs/tensorflow/Chatbot/question files/I need help.txt', 'i need help')
|
87 |
-
#addQuestion('/opt/homebrew/anaconda3/envs/tensorflow/Chatbot/question files/your food.txt', 'your food')
|
88 |
-
#addQuestion('/opt/homebrew/anaconda3/envs/tensorflow/Chatbot/question files/what time.txt', 'what time')
|
89 |
-
#addQuestion('/opt/homebrew/anaconda3/envs/tensorflow/Chatbot/question files/weather.txt', 'weather')
|
90 |
-
#addQuestion('/opt/homebrew/anaconda3/envs/tensorflow/Chatbot/question files/your job.txt', 'your job')
|
91 |
-
#addQuestion('/opt/homebrew/anaconda3/envs/tensorflow/Chatbot/question files/old.txt', 'age')
|
92 |
|
93 |
|
94 |
labels = []
|
|
|
53 |
|
54 |
return question,ans
|
55 |
|
56 |
+
def addQuestion(file):
|
57 |
+
|
58 |
+
name = str(file).strip('.txt')
|
59 |
+
# print(f"\n\n{name}\n\n")
|
60 |
+
|
61 |
temp_ques = {}
|
62 |
temp_ans = {}
|
63 |
|
|
|
72 |
ans_data = {}
|
73 |
|
74 |
|
75 |
+
addQuestion('hello.txt')
|
76 |
+
addQuestion('how are you.txt')
|
77 |
+
addQuestion('interest.txt')
|
78 |
+
|
79 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
|
81 |
|
82 |
labels = []
|