Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -109,7 +109,7 @@ def generate_response(prompt):
|
|
| 109 |
try:
|
| 110 |
model, tokenizer = load_unsloth_model()
|
| 111 |
context = st.session_state.file_context or ""
|
| 112 |
-
full_prompt = f"You are an expert in
|
| 113 |
|
| 114 |
inputs = tokenizer(full_prompt, return_tensors="pt").to(model.device)
|
| 115 |
outputs = model.generate(**inputs, max_new_tokens=256, do_sample=False)
|
|
|
|
| 109 |
try:
|
| 110 |
model, tokenizer = load_unsloth_model()
|
| 111 |
context = st.session_state.file_context or ""
|
| 112 |
+
full_prompt = f"You are an expert in life balance and general knowledge. Use the context to answer precisely.\nContext: {context}\n\nQuestion: {prompt}"
|
| 113 |
|
| 114 |
inputs = tokenizer(full_prompt, return_tensors="pt").to(model.device)
|
| 115 |
outputs = model.generate(**inputs, max_new_tokens=256, do_sample=False)
|