Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -15,10 +15,10 @@ tokenizer = AutoTokenizer.from_pretrained(model_id)
|
|
15 |
|
16 |
model = AutoModelForCausalLM.from_pretrained(model_id)
|
17 |
|
18 |
-
|
19 |
-
|
20 |
|
21 |
-
|
22 |
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
23 |
|
24 |
|
|
|
15 |
|
16 |
model = AutoModelForCausalLM.from_pretrained(model_id)
|
17 |
|
18 |
+
text = "TinyPixel/Llama-2-7B-bf16-sharded"
|
19 |
+
inputs = tokenizer(text, return_tensors="pt")
|
20 |
|
21 |
+
outputs = model.generate(**inputs, max_new_tokens=20)
|
22 |
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
23 |
|
24 |
|