-1

enter image description here

I attached the image for reference. When I tested the model.py for the bot, it returns 0.0012 loss in epoch. I'm not very familiar with the language, so need some help

I'm trying to resolve that one issue. I need someone to review my code. I can share the git URL if requested

Vivek_k24
  • 1
  • 1

1 Answers1

0

I found the answer to it. When you open the file by using only ./intents.json or intents.json sometimes it can't find it because it runs the code from other directory. Try this, I have adapted code from https://stackoverflow.com/a/65174822/11839142:

from pathlib import Path

p = Path(__file__).with_name('intents.json')
with p.open('r') as json_data:
    intents = json.load(json_data.read())
Nic13Gamer
  • 69
  • 5
  • 1
    Thank you for sharing your view. It still says file not found. Any other suggestions. Also, check the folders structure. does it need any changes? – Vivek_k24 Nov 04 '22 at 23:36
  • Hey, I found this other solution, https://stackoverflow.com/a/65174822/11839142. Try this, hope it helps! I will update my answer and if it works I ask for you to mark it as the correct answer, thanks! – Nic13Gamer Nov 04 '22 at 23:47