DylanZimmer commited on
Commit
2ffa472
·
1 Parent(s): 8cf437b

Remove system prompt for size check

Browse files
Files changed (1) hide show
  1. app.py +4 -7
app.py CHANGED
@@ -11,8 +11,8 @@ chatbot = pipeline(
11
  )
12
 
13
  system_prompt_default = (
14
- "You are a highly intelligent and helpful AI assistant named Tiny Chat, "
15
- "developed by amusktweewt. Always refer to yourself like that. "
16
  "Your responses should be clear, concise, and accurate. "
17
  "Always prioritize user needs, provide well-structured answers, "
18
  "and maintain a friendly yet professional tone. "
@@ -33,7 +33,7 @@ def apply_tiny_chat_template(messages):
33
  prompt += f"<|response|> {content}\n"
34
  return prompt
35
 
36
- def chat_fxn_caller(message, history, system_prompt=system_prompt_default, temperature=0.6, top_p=0.95, max_tokens=128):
37
  messages = []
38
  if system_prompt.strip():
39
  messages.append({"role": "system", "content": system_prompt})
@@ -76,10 +76,7 @@ def chat_fxn_caller(message, history, system_prompt=system_prompt_default, tempe
76
 
77
  demo = gr.ChatInterface(
78
  chat_fxn_caller,
79
- type="messages",
80
- additional_inputs=[
81
- gr.Textbox(system_prompt_default, label="System Prompt"),
82
- ],
83
  )
84
 
85
  demo.launch()
 
11
  )
12
 
13
  system_prompt_default = (
14
+ "You are a highly intelligent and helpful AI assistant named Tiny Chat. "
15
+ "Always refer to yourself like that. "
16
  "Your responses should be clear, concise, and accurate. "
17
  "Always prioritize user needs, provide well-structured answers, "
18
  "and maintain a friendly yet professional tone. "
 
33
  prompt += f"<|response|> {content}\n"
34
  return prompt
35
 
36
+ def chat_fxn_caller(message, history, temperature=0.6, top_p=0.95, max_tokens=128):
37
  messages = []
38
  if system_prompt.strip():
39
  messages.append({"role": "system", "content": system_prompt})
 
76
 
77
  demo = gr.ChatInterface(
78
  chat_fxn_caller,
79
+ type="messages"
 
 
 
80
  )
81
 
82
  demo.launch()