remzicam commited on
Commit
e6fd326
1 Parent(s): 06fa194

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +20 -0
README.md CHANGED
@@ -1,3 +1,23 @@
1
  ---
2
  license: other
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: other
3
  ---
4
+ #you must download blender_model.py script
5
+ #transformers==4.15.0
6
+ #you can use the model with huggingface pipelines and generate function
7
+
8
+ from blender_model import blender_onnx_model
9
+ from transformers import BlenderbotSmallTokenizer
10
+
11
+ tokenizer_name="facebook/blenderbot_small-90M"
12
+ max_answer_length=100
13
+ tokenizer = BlenderbotSmallTokenizer.from_pretrained(tokenizer_name)
14
+ model=blender_onnx_model
15
+
16
+ utterance="Hello, how are you?"
17
+ inputs = tokenizer(utterance,
18
+ return_tensors="pt")
19
+ outputs= model.generate(**inputs,
20
+ max_length=max_answer_length)
21
+ response=tokenizer.decode(outputs[0],
22
+ skip_special_tokens = True)
23
+ print(response)