Staticaliza
commited on
Commit
•
04320ba
1
Parent(s):
e864faa
Update app.py
Browse files
app.py
CHANGED
@@ -33,11 +33,16 @@ def format(instruction, history, input, preoutput):
|
|
33 |
formatted_input = f"{sy_l}System: {instruction}{sy_r}\n{formatted_history}{sy_l}{input}{sy_r}\n{sy_l}{preoutput}"
|
34 |
return formatted_input
|
35 |
|
36 |
-
def predict(instruction
|
37 |
|
38 |
if (access_key != KEY):
|
39 |
print(">>> MODEL FAILED: Input: " + input + ", Attempted Key: " + access_key)
|
40 |
return ("[UNAUTHORIZED ACCESS]", input);
|
|
|
|
|
|
|
|
|
|
|
41 |
|
42 |
stops = json.loads(stop_seqs)
|
43 |
|
|
|
33 |
formatted_input = f"{sy_l}System: {instruction}{sy_r}\n{formatted_history}{sy_l}{input}{sy_r}\n{sy_l}{preoutput}"
|
34 |
return formatted_input
|
35 |
|
36 |
+
def predict(instruction, history, input, preoutput, access_key, model, temperature, top_p, top_k, rep_p, max_tokens, stop_seqs, seed):
|
37 |
|
38 |
if (access_key != KEY):
|
39 |
print(">>> MODEL FAILED: Input: " + input + ", Attempted Key: " + access_key)
|
40 |
return ("[UNAUTHORIZED ACCESS]", input);
|
41 |
+
|
42 |
+
instruction = instruction or DEFAULT_INSTRUCTION
|
43 |
+
history = history or []
|
44 |
+
input = input or ""
|
45 |
+
preoutput = preoutput or ""
|
46 |
|
47 |
stops = json.loads(stop_seqs)
|
48 |
|