I tried making an ai chat bot in python language using ide pycharm via the code given below. But, there is an error coming of tensoflow regarding cuda

import random
import json
import pickle
import numpy as np

import nltk
from nltk.stem import WordNetLemmatizer

from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense, Activation, Dropout
from tensorflow.keras.optimizers import SGD

lemmatizer = 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.append(word_list)
    documents.append((word_list, intent['tag']))
    if intent ['tag'] not in classes:
        classes.append(intent['tag'])

This was my code of main.py(Given above)

{"intents":  [
{"tag": "greetings",
"patterns": ["hello","hey","hi","good day","namaste","greetings","whats up?","how is it 
 going?"],
"responses": ["Hello!","Hey!","What can I do for you?","Greetings!","Welcome!"]
},
{"tag": "name",
"patterns": ["what's you name?","what is your name?","what are you called?","What can I call 
 you?"],
"responses": ["My name is Misa, The AI chatbot.","You can call me Misa, The AI chatbot."]
},
{"tag": "inventor",
"patterns": ["Who made you?","By whom were you made","Who is your inventor","Who controls 
 you?","Who is your master?"],
"responses": ["I was made by NetBreakINC."]
 }
]}

This was my code of intents.json(Given above)

2021-06-15 13:09:29.606510: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] 
Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found

2021-06-15 13:09:29.607208: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above 
cudart dlerror if you do not have a GPU set up on your machine.

Process finished with exit code 0

This was the error coming(given above)

I was following tutorial of NeuralNine.
Here is the link of the video -> https://youtu.be/1lwddP0KUEg
Please answer in simple words and explain the processes. I’ll be very thankful to you. Help a beginner!

Source: Python Questions

LEAVE A COMMENT