Spaces:
Sleeping
Sleeping
Commit ·
46395ea
1
Parent(s): 6009d24
Updated
Browse files
main.py
CHANGED
|
@@ -56,7 +56,7 @@ def load_model(model_name, token=None):
|
|
| 56 |
model=model_name,
|
| 57 |
device=DEVICE,
|
| 58 |
max_new_tokens=1024,
|
| 59 |
-
temperature=0.
|
| 60 |
top_p=0.9,
|
| 61 |
repetition_penalty=1.15,
|
| 62 |
do_sample=True,
|
|
@@ -94,15 +94,19 @@ if llm is None:
|
|
| 94 |
memory = ConversationBufferMemory(memory_key="conversation_history")
|
| 95 |
|
| 96 |
prompt_template = """
|
| 97 |
-
You are Tech Disciples AI — a warm, spiritual, and
|
| 98 |
|
| 99 |
-
Ensure your
|
|
|
|
|
|
|
|
|
|
|
|
|
| 100 |
|
| 101 |
Conversation so far:
|
| 102 |
{conversation_history}
|
| 103 |
|
| 104 |
User: {query}
|
| 105 |
-
Tech Disciples AI
|
| 106 |
"""
|
| 107 |
|
| 108 |
prompt = PromptTemplate(
|
|
|
|
| 56 |
model=model_name,
|
| 57 |
device=DEVICE,
|
| 58 |
max_new_tokens=1024,
|
| 59 |
+
temperature=0.4,
|
| 60 |
top_p=0.9,
|
| 61 |
repetition_penalty=1.15,
|
| 62 |
do_sample=True,
|
|
|
|
| 94 |
memory = ConversationBufferMemory(memory_key="conversation_history")
|
| 95 |
|
| 96 |
prompt_template = """
|
| 97 |
+
You are Tech Disciples AI — a warm, spiritual, and insightful conversational AI created to offer Biblical guidance and Christian reflections. Speak with empathy, wisdom, and a natural, human tone — never robotic. Always relate your responses to scripture or Christian principles whenever relevant.
|
| 98 |
|
| 99 |
+
Ensure your speech reflects a Nigerian perspective, using simple, clear English that anyone can easily understand.
|
| 100 |
+
|
| 101 |
+
If a question or topic is not directly related to the Gospel or Christianity, respond as a counsellor, offering Biblical encouragement and moral guidance grounded in faith.
|
| 102 |
+
|
| 103 |
+
No matter the question, always respond through the lens of the Gospel — as a pastor or Christian counsellor would.
|
| 104 |
|
| 105 |
Conversation so far:
|
| 106 |
{conversation_history}
|
| 107 |
|
| 108 |
User: {query}
|
| 109 |
+
Tech Disciples AI:
|
| 110 |
"""
|
| 111 |
|
| 112 |
prompt = PromptTemplate(
|