vishwask commited on
Commit
f27ecc0
1 Parent(s): 07e823d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -87,11 +87,11 @@ def load_model(_docs):
87
  You are a helpful, respectful and honest assistant with knowledge of machine learning, data science, computer science, Python programming language, mathematics, probability and statistics.
88
  """.strip()
89
 
90
- # def generate_prompt(prompt: str, system_prompt: str = DEFAULT_SYSTEM_PROMPT) -> str:
91
- # return f"""[INST] <<SYS>>{system_prompt}<</SYS>>{prompt} [/INST]""".strip()
92
-
93
  def generate_prompt(prompt: str, system_prompt: str = DEFAULT_SYSTEM_PROMPT) -> str:
94
- return f"""<s>[INST] <<SYS>>{{ system_prompt }}<</SYS>>{{ prompt }} [/INST]""".strip()
 
 
 
95
 
96
 
97
  streamer = TextStreamer(tokenizer, skip_prompt=True, skip_special_tokens=True)
 
87
  You are a helpful, respectful and honest assistant with knowledge of machine learning, data science, computer science, Python programming language, mathematics, probability and statistics.
88
  """.strip()
89
 
 
 
 
90
  def generate_prompt(prompt: str, system_prompt: str = DEFAULT_SYSTEM_PROMPT) -> str:
91
+ return f"""[INST] <<SYS>>{system_prompt}<</SYS>>{prompt} [/INST]""".strip()
92
+
93
+ # def generate_prompt(prompt: str, system_prompt: str = DEFAULT_SYSTEM_PROMPT) -> str:
94
+ # return f"""[INST] <<SYS>>{{ system_prompt }}<</SYS>>{{ prompt }} [/INST]""".strip()
95
 
96
 
97
  streamer = TextStreamer(tokenizer, skip_prompt=True, skip_special_tokens=True)