Commit
·
7d1ab36
1
Parent(s):
9a4bb8e
Update app.py
Browse files
app.py
CHANGED
@@ -15,9 +15,7 @@ def format_prompt(message, history):
|
|
15 |
prompt += tokenize("[INST]") + tokenize(message) + tokenize("[/INST]")
|
16 |
return prompt
|
17 |
|
18 |
-
def generate(
|
19 |
-
prompt, history, temperature=0.2, max_new_tokens=512, top_p=0.95, repetition_penalty=1.0,
|
20 |
-
):
|
21 |
temperature = float(temperature)
|
22 |
if temperature < 1e-2:
|
23 |
temperature = 1e-2
|
|
|
15 |
prompt += tokenize("[INST]") + tokenize(message) + tokenize("[/INST]")
|
16 |
return prompt
|
17 |
|
18 |
+
def generate(prompt, history, temperature=0.2, max_new_tokens=512, top_p=0.95, repetition_penalty=1.0):
|
|
|
|
|
19 |
temperature = float(temperature)
|
20 |
if temperature < 1e-2:
|
21 |
temperature = 1e-2
|