Spaces:
Sleeping
Sleeping
LongLe3102000
commited on
Commit
•
7e73412
1
Parent(s):
fd90fe4
Update app.py
Browse files
app.py
CHANGED
@@ -35,13 +35,13 @@ def respond(encoded_smiles, max_tokens, temperature, top_p, top_k):
|
|
35 |
}
|
36 |
|
37 |
# Tokenize the input
|
38 |
-
input_ids = llm.
|
39 |
|
40 |
# Generate the output
|
41 |
outputs = llm.generate(input_ids=input_ids, **settings)
|
42 |
|
43 |
# Decode the output tokens to text
|
44 |
-
output_text = llm.
|
45 |
|
46 |
# Extract the predicted selfies from the output text
|
47 |
first_inst_index = output_text.find("[/INST]")
|
|
|
35 |
}
|
36 |
|
37 |
# Tokenize the input
|
38 |
+
input_ids = llm.tokenize(encoded_smiles)
|
39 |
|
40 |
# Generate the output
|
41 |
outputs = llm.generate(input_ids=input_ids, **settings)
|
42 |
|
43 |
# Decode the output tokens to text
|
44 |
+
output_text = llm.decode(outputs[0], skip_special_tokens=True)
|
45 |
|
46 |
# Extract the predicted selfies from the output text
|
47 |
first_inst_index = output_text.find("[/INST]")
|