Spaces:
Sleeping
Sleeping
Update app_strict_lora.py
Browse files- app_strict_lora.py +11 -9
app_strict_lora.py
CHANGED
|
@@ -64,16 +64,18 @@ def chat_with_model(message, history):
|
|
| 64 |
|
| 65 |
# --- STRICT CONTEXT ENFORCEMENT ---
|
| 66 |
# Model can only use knowledge from diffusers GitHub repo
|
|
|
|
|
|
|
| 67 |
context = (
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
|
| 78 |
# Build conversation history
|
| 79 |
for user, bot in history:
|
|
|
|
| 64 |
|
| 65 |
# --- STRICT CONTEXT ENFORCEMENT ---
|
| 66 |
# Model can only use knowledge from diffusers GitHub repo
|
| 67 |
+
# LORA_REPO = "rahul7star/GPT-Diffuser-v1" # fine-tuned LoRA
|
| 68 |
+
|
| 69 |
context = (
|
| 70 |
+
f"You are an AI assistant fine-tuned exclusively with the LoRA model from "
|
| 71 |
+
f"'{LORA_REPO}'. "
|
| 72 |
+
"Answer strictly using knowledge, code, classes, functions, or documentation "
|
| 73 |
+
"learned by this LoRA. "
|
| 74 |
+
"Do not reference any other models, frameworks, tutorials, blogs, or external sources. "
|
| 75 |
+
"If the answer cannot be derived from this LoRA, respond with:\n\n"
|
| 76 |
+
"\"I don’t have enough information from this LoRA to answer that.\"\n\n"
|
| 77 |
+
"Conversation:\n"
|
| 78 |
+
)
|
| 79 |
|
| 80 |
# Build conversation history
|
| 81 |
for user, bot in history:
|