rahul7star commited on
Commit
732612d
·
verified ·
1 Parent(s): 246d52e

Update app_strict_lora.py

Browse files
Files changed (1) hide show
  1. 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
- "You are an AI assistant fine-tuned exclusively on the Hugging Face Diffusers "
69
- "GitHub repository (https://github.com/huggingface/diffusers.git). "
70
- "You must only answer questions using code, classes, functions, or documentation "
71
- "found within that repository. "
72
- "Do not reference any other frameworks, blogs, or tutorials. "
73
- "If the answer cannot be found in the diffusers source code, respond with:\n\n"
74
- "\"I don’t have enough information from the diffusers repository to answer that.\"\n\n"
75
- "Conversation:\n"
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: