Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
|
|
| 1 |
from transformers import AutoTokenizer, LlamaForCausalLM
|
| 2 |
|
| 3 |
model = LlamaForCausalLM.from_pretrained(PATH_TO_CONVERTED_WEIGHTS)
|
|
@@ -8,4 +9,6 @@ inputs = tokenizer(prompt, return_tensors="pt")
|
|
| 8 |
|
| 9 |
# Generate
|
| 10 |
generate_ids = model.generate(inputs.input_ids, max_length=30)
|
| 11 |
-
tokenizer.batch_decode(generate_ids, skip_special_tokens=True, clean_up_tokenization_spaces=False)[0]
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
from transformers import AutoTokenizer, LlamaForCausalLM
|
| 3 |
|
| 4 |
model = LlamaForCausalLM.from_pretrained(PATH_TO_CONVERTED_WEIGHTS)
|
|
|
|
| 9 |
|
| 10 |
# Generate
|
| 11 |
generate_ids = model.generate(inputs.input_ids, max_length=30)
|
| 12 |
+
tokenizer.batch_decode(generate_ids, skip_special_tokens=True, clean_up_tokenization_spaces=False)[0]
|
| 13 |
+
"""
|
| 14 |
+
print("Hello World!")
|