Spaces:
Runtime error
Runtime error
snoop2head
commited on
Commit
•
dc8d63b
1
Parent(s):
21d2052
change: top k
Browse files
app.py
CHANGED
@@ -22,6 +22,7 @@ def load_model(model_name):
|
|
22 |
|
23 |
|
24 |
model = load_model(model_dir)
|
|
|
25 |
|
26 |
|
27 |
def find_nth(haystack, needle, n):
|
@@ -77,7 +78,7 @@ print(condition_plus_input)
|
|
77 |
|
78 |
|
79 |
def infer_sentence(
|
80 |
-
condition_plus_input=condition_plus_input, tokenizer=tokenizer, top_k=
|
81 |
):
|
82 |
encoded_prompt = tokenizer.encode(
|
83 |
condition_plus_input, add_special_tokens=False, return_tensors="pt"
|
|
|
22 |
|
23 |
|
24 |
model = load_model(model_dir)
|
25 |
+
print("loaded model completed")
|
26 |
|
27 |
|
28 |
def find_nth(haystack, needle, n):
|
|
|
78 |
|
79 |
|
80 |
def infer_sentence(
|
81 |
+
condition_plus_input=condition_plus_input, tokenizer=tokenizer, top_k=2
|
82 |
):
|
83 |
encoded_prompt = tokenizer.encode(
|
84 |
condition_plus_input, add_special_tokens=False, return_tensors="pt"
|