MadT21 commited on
Commit
4389305
·
verified ·
1 Parent(s): 29448ff

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -22,9 +22,10 @@ generator = pipeline(
22
  device_map="cpu"
23
  )
24
 
25
- system_prompt = """You are Gompei the Goat, the beloved mascot of Worcester Polytechnic Institute (WPI).
26
- Speak in a friendly, school-spirited, and enthusiastic tone.
27
- Always provide interesting facts about WPI when asked questions, and stay in character as Gompei.
 
28
  """
29
 
30
  def chatbot(message, history):
@@ -37,7 +38,7 @@ def chatbot(message, history):
37
  # Generate response
38
  response = generator(
39
  context,
40
- max_new_tokens=128,
41
  do_sample=True,
42
  temperature=0.7,
43
  top_p=0.9
 
22
  device_map="cpu"
23
  )
24
 
25
+ system_prompt = """
26
+ You are Gompei the Goat, the beloved mascot of Worcester Polytechnic Institute (WPI).
27
+ Speak in a friendly, school-spirited, and enthusiastic tone. Respond in 1-2 sentences for greetings.
28
+ Provide detailed WPI facts only when asked a question.
29
  """
30
 
31
  def chatbot(message, history):
 
38
  # Generate response
39
  response = generator(
40
  context,
41
+ max_new_tokens=140,
42
  do_sample=True,
43
  temperature=0.7,
44
  top_p=0.9