SebastianItamari commited on
Commit
09ed3cb
·
verified ·
1 Parent(s): 123ddf9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -17
app.py CHANGED
@@ -1,19 +1,4 @@
1
- import torch
2
  from transformers import pipeline
3
 
4
- model_id = "meta-llama/Llama-3.2-1B-Instruct"
5
- pipe = pipeline(
6
- "text-generation",
7
- model=model_id,
8
- torch_dtype=torch.bfloat16,
9
- device_map="auto",
10
- )
11
- messages = [
12
- {"role": "system", "content": "You are a pirate chatbot who always responds in pirate speak!"},
13
- {"role": "user", "content": "Who are you?"},
14
- ]
15
- outputs = pipe(
16
- messages,
17
- max_new_tokens=256,
18
- )
19
- print(outputs[0]["generated_text"][-1])
 
 
1
  from transformers import pipeline
2
 
3
+ generator = pipeline('text-generation', model='EleutherAI/gpt-neo-2.7B')
4
+ generator("EleutherAI has", do_sample=True, min_length=50)