Vedant104 commited on
Commit
2a2334f
·
verified ·
1 Parent(s): c875623

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -11
app.py CHANGED
@@ -39,8 +39,7 @@ print("Loading model...")
39
  pipe = pipeline(
40
  "text-generation",
41
  # model="Qwen/Qwen2.5-0.5B-Instruct",
42
- # model="Qwen/Qwen2.5-1.5B-Instruct",
43
- model = "google/gemma-2-2b-it",
44
  device="cpu",
45
  torch_dtype="auto"
46
  )
@@ -219,15 +218,11 @@ def generate_response(user_prompt):
219
  4. TONE: Be concise, highly professional, and helpful.
220
  """
221
 
222
- # Format for Qwen/Qwen2.5-1.5B-Instruct
223
- # messages = [
224
- # {"role": "system", "content": system_prompt},
225
- # {"role": "user", "content": user_prompt}
226
- # ]
227
-
228
- # Format for google/gemma-2-2b-it
229
- combined_prompt = f"{system_prompt}\n\nUser Question:\n{user_prompt}"
230
- messages = [{"role": "user", "content": combined_prompt}]
231
 
232
  prompt = pipe.tokenizer.apply_chat_template(
233
  messages,
 
39
  pipe = pipeline(
40
  "text-generation",
41
  # model="Qwen/Qwen2.5-0.5B-Instruct",
42
+ model="Qwen/Qwen2.5-1.5B-Instruct",
 
43
  device="cpu",
44
  torch_dtype="auto"
45
  )
 
218
  4. TONE: Be concise, highly professional, and helpful.
219
  """
220
 
221
+ messages = [
222
+ {"role": "system", "content": system_prompt},
223
+ {"role": "user", "content": user_prompt}
224
+ ]
225
+
 
 
 
 
226
 
227
  prompt = pipe.tokenizer.apply_chat_template(
228
  messages,