kingkolor8 commited on
Commit
6794e43
·
verified ·
1 Parent(s): c2e381e

Create Ai-relationship.py

Browse files
Files changed (1) hide show
  1. Ai-relationship.py +15 -0
Ai-relationship.py ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from gpt4all import GPT4All
2
+
3
+ # Model File Path
4
+ model_path = "/data/data/com.termux/files/home/gpt4all_model.gguf"
5
+
6
+ # Load Model
7
+ model = GPT4All(model_path)
8
+
9
+ # Chat Function
10
+ while True:
11
+ user_input = input("You: ")
12
+ if user_input.lower() in ["exit", "quit"]:
13
+ break
14
+ response = model.chat(user_input)
15
+ print("AI:", response)