HummanAI / main.py
RuyX's picture
Upload 2 files
7fa69c2 verified
from gpt4all import GPT4All
model = GPT4All(
model_name="Model_Bahasa_Ram 2.gguf",
model_path="./model/",
allow_download=False
)
print("=== HackCat AI Chat ===")
print("(Ketik 'exit' untuk berhenti)\n")
with model.chat_session():
while True:
pesan = input("Kamu: ")
if pesan.lower() == 'exit':
break
print("AI: ", end="", flush=True)
for teks in model.generate(pesan, max_tokens=500, streaming=True):
print(teks, end="", flush=True)
print()