Spaces:
Sleeping
Sleeping
Update app_strict_lora.py
Browse files- app_strict_lora.py +9 -1
app_strict_lora.py
CHANGED
|
@@ -89,7 +89,15 @@ def chat_with_model(message, history):
|
|
| 89 |
if pipe is None:
|
| 90 |
return "", history, "⚠️ Model pipeline not loaded."
|
| 91 |
|
| 92 |
-
context =
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 93 |
for user, bot in history:
|
| 94 |
context += f"User: {user}\nAssistant: {bot}\n"
|
| 95 |
context += f"User: {message}\nAssistant:"
|
|
|
|
| 89 |
if pipe is None:
|
| 90 |
return "", history, "⚠️ Model pipeline not loaded."
|
| 91 |
|
| 92 |
+
context = (
|
| 93 |
+
"You are a coding assistant **fine-tuned exclusively on the Hugging Face Diffusers GitHub repository** "
|
| 94 |
+
"(https://github.com/huggingface/diffusers.git). "
|
| 95 |
+
"Answer questions strictly based on that repository’s Python source code, docstrings, and implementation details. "
|
| 96 |
+
"If the answer cannot be found or inferred directly from the diffusers codebase, respond with:\n"
|
| 97 |
+
"\"I don’t have enough information from the diffusers repository to answer that.\"\n\n"
|
| 98 |
+
"Conversation:\n"
|
| 99 |
+
)
|
| 100 |
+
|
| 101 |
for user, bot in history:
|
| 102 |
context += f"User: {user}\nAssistant: {bot}\n"
|
| 103 |
context += f"User: {message}\nAssistant:"
|