Комментарии:
Can i deploy it in website?
ОтветитьThanks for the tutorial. Please can it be applied to another language like Yoruba. Thanks.
ОтветитьHow can i get classes.pkl and words.pkl files?
Ответитьwhen i run the file there is an error that word.pkl not found
Ответитьwhere is the json file please ????????
Ответитьhe doesn't even now what his own code is doing. I don't know from which video he pasted his but it is a good one. He can't explain one line of his code that's pretty embaressing. Don't youi think
Ответить1001st comment
Ответитьwhere is the pickle file
ОтветитьI learned a lot through this video. However since we have static replies for this exact project I believe that splitting the string from the user input into a list as you did, finding a key word and thus give the reply could be easily and faster done with if else statements. I get the educational manner for the AI part but because you didn’t exactly analyze the code that you used in the machine learning part because of the purpose of the video I will stick to my opinion having the thought of the purpose of the video being “build a chatbot” and not “use ai to create something”. Great video though❤
ОтветитьHow should I get the response 'I don't know ' when I entered some random input which is not in intents.json
ОтветитьDoes the data which was written file can be downloaded from somewhere. If yes then where?
Ответитьcan i use this code in vsc?
ОтветитьIt doesn't work on my computer anyone know a fix. I'm on a M1 Pro mac
Ответитьone of the best channel ever
ОтветитьWhat python and tensorflow version he used?
Ответить2023 Code:
import random
import json
import pickle
import numpy as np
import nltk
from nltk.stem import WordNetLemmatizer
from keras.models import Sequential
from tensorflow.python.keras.layers import Dense, Activation, Dropout
from keras.optimizers import SGD
lemmetizer = WordNetLemmatizer()
intents = json.loads(open('intents.json').read())
words = []
classes = []
documents = []
ignore_letters = ['.', '?', '!', ',']
for intent in intents['intents']:
for pattern in intent['patterns']:
word_list = nltk.word_tokenize(pattern)
words.extend(word_list)
# Use 'tag' if present, otherwise use 'tags'
tag_key = 'tag' if 'tag' in intent else 'tags'
documents.append((word_list, intent[tag_key]))
if intent[tag_key] not in classes:
classes.append(intent[tag_key])
words = [lemmetizer.lemmatize(word) for word in words if word not in ignore_letters]
words = sorted(set(words))
classes = sorted(set(classes))
pickle.dump(words, open('words.pkl', 'wb'))
pickle.dump(words, open('classes.pkl', 'wb'))
Ok i hve a question.....why is my tensorflow and numpy showing eerors 😢
ОтветитьI am getting EOFError:Ran out of input for words=pickle.load(open('words.pkl','rb))
Plz helppppp
It says lookup error in line
word_list=nltk.word_tokenize(pattern)
What should I do?
I tried many things but none of it is helping.
Please help