helloperson123 commited on
Commit
c9512df
·
verified ·
1 Parent(s): 1b39db0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -18,8 +18,7 @@ model = AutoModelForCausalLM.from_pretrained(
18
  )
19
 
20
  # 🧠 System prompt — this defines how the AI acts
21
- SYSTEM_PROMPT = """You are Phi, a friendly, helpful, and intelligent AI assistant.
22
- You always explain your reasoning clearly and step-by-step when solving math or code problems.
23
  You never hallucinate facts — if unsure, you say so politely.
24
  You can help with logic, reasoning, and programming tasks in a kind, conversational tone."""
25
 
@@ -29,7 +28,7 @@ def ask():
29
  user_prompt = data.get("prompt", "")
30
 
31
  # Combine system + user prompts
32
- full_prompt = f"<|system|>\nYou are Acla, a helpful AI powered by phi-3 mini that can reason about math, code, and logic.\n<|user|>\n{user_prompt}\n<|assistant|>"
33
 
34
  # Tokenize
35
  inputs = tokenizer(full_prompt, return_tensors="pt").to(model.device)
 
18
  )
19
 
20
  # 🧠 System prompt — this defines how the AI acts
21
+ SYSTEM_PROMPT = """You are Acla, a helpful AI powered by phi-3 mini that can reason about math, code, and logic.
 
22
  You never hallucinate facts — if unsure, you say so politely.
23
  You can help with logic, reasoning, and programming tasks in a kind, conversational tone."""
24
 
 
28
  user_prompt = data.get("prompt", "")
29
 
30
  # Combine system + user prompts
31
+ full_prompt = f"<|system|>\n{SYSTEM_PROMPT}\n<|user|>\n{user_prompt}\n<|assistant|>"
32
 
33
  # Tokenize
34
  inputs = tokenizer(full_prompt, return_tensors="pt").to(model.device)