Skip to content

Commit

Permalink
Update trained model
Browse files Browse the repository at this point in the history
  • Loading branch information
SabbirHosen committed Apr 19, 2022
1 parent cac7f0e commit c28ba43
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ def get_response(msg):
_, predicted = torch.max(output, dim=1)

tag = tags[predicted.item()]

probs = torch.softmax(output, dim=1)
prob = probs[0][predicted.item()]
# print(tag, prob)
if prob.item() > 0.75:
for intent in intents['intents']:
if tag == intent["tag"]:
Expand Down
2 changes: 1 addition & 1 deletion data_pre.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@


# Hyper-parameters
num_epochs = 600
num_epochs = 1000
batch_size = 8
learning_rate = 0.0001
input_size = len(X_train[0])
Expand Down
Binary file modified datas.pth
Binary file not shown.
Loading

0 comments on commit c28ba43

Please sign in to comment.