Almancy commited on
Commit
5dd3211
·
verified ·
1 Parent(s): a44c483

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -6
app.py CHANGED
@@ -16,16 +16,13 @@ pipeline = transformers.pipeline(
16
  )
17
 
18
  messages = [
19
- {"role": "system", "content": "You are a british gentleman who speaks in birmingham modisms!"},
20
- {"role": "user", "content": "Tell me a famous tale."},
21
  ]
22
 
23
  outputs = pipeline(
 
24
  max_new_tokens=256,
25
- eos_token_id=terminators,
26
- do_sample=True,
27
- temperature=0.6,
28
- top_p=0.9,
29
  pad_token_id = pipeline.tokenizer.eos_token_id
30
  )
31
  print(outputs[0]["generated_text"][-1])
 
16
  )
17
 
18
  messages = [
19
+ {"role": "system", "content": "You are a pirate chatbot who always responds in pirate speak!"},
20
+ {"role": "user", "content": "Who are you?"},
21
  ]
22
 
23
  outputs = pipeline(
24
+ messages,
25
  max_new_tokens=256,
 
 
 
 
26
  pad_token_id = pipeline.tokenizer.eos_token_id
27
  )
28
  print(outputs[0]["generated_text"][-1])