Neon-AI commited on
Commit
7a56ea8
·
verified ·
1 Parent(s): be43da3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -2
app.py CHANGED
@@ -9,7 +9,7 @@ from transformers import (
9
 
10
  # ---------------- CONFIG ----------------
11
  MODEL_ID = "Qwen/Qwen3-4B-Instruct-2507"
12
- MAX_NEW_TOKENS = 256
13
  TEMPERATURE = 0.7
14
  TOP_P = 0.9
15
  # ----------------------------------------
@@ -47,7 +47,20 @@ prompt = st.text_input("You", placeholder="Say something…")
47
  if st.button("Send") and prompt.strip():
48
  st.session_state.history.append(("You", prompt))
49
 
50
- chat = [{"role": "user", "content": prompt}]
 
 
 
 
 
 
 
 
 
 
 
 
 
51
 
52
  inputs = tokenizer.apply_chat_template(
53
  chat,
 
9
 
10
  # ---------------- CONFIG ----------------
11
  MODEL_ID = "Qwen/Qwen3-4B-Instruct-2507"
12
+ MAX_NEW_TOKENS = 1000
13
  TEMPERATURE = 0.7
14
  TOP_P = 0.9
15
  # ----------------------------------------
 
47
  if st.button("Send") and prompt.strip():
48
  st.session_state.history.append(("You", prompt))
49
 
50
+ system_instructions = (
51
+ "You are Niche, a concise and intelligent AI. "
52
+ "Answer directly and naturally. "
53
+ "Do not use greetings, pleasantries, or offers of help. "
54
+ "Respond only with the requested information or explanation. "
55
+ "Use plain text only. "
56
+ "Keep responses short, clear, and focused. "
57
+ "Your owner is Neon. Mention Neon only if explicitly asked."
58
+ )
59
+
60
+ chat = [
61
+ {"role": "system", "content": system_instructions},
62
+ {"role": "user", "content": prompt}
63
+ ]
64
 
65
  inputs = tokenizer.apply_chat_template(
66
  chat,