Update app.py
Browse files
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"""
|
|
|
|
|
|
|
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)
|