raynardj commited on
Commit
69e4343
1 Parent(s): 5dd4945

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +4 -1
README.md CHANGED
@@ -29,8 +29,9 @@ widget:
29
 
30
  ```python
31
 
 
32
  tokenizer = AutoTokenizer.from_pretrained('raynardj/keywords-cangtou-chinese-poetry')
33
- model = AutoModel.from_pretrained('raynardj/keywords-cangtou-chinese-poetry')
34
 
35
  def inference(lead, keywords = []):
36
  """
@@ -70,6 +71,8 @@ def inference(lead, keywords = []):
70
  generate = generate.replace("》","》\n").replace("。","。\n").replace(" ","")
71
  return generate
72
  ```
 
 
73
 
74
  ## Cherry picking
75
  大家下了模型,可以自己玩耍。
 
29
 
30
  ```python
31
 
32
+ from transformers import (AutoTokenizer, AutoModelForCausalLM)
33
  tokenizer = AutoTokenizer.from_pretrained('raynardj/keywords-cangtou-chinese-poetry')
34
+ model = AutoModelForCausalLM.from_pretrained('raynardj/keywords-cangtou-chinese-poetry')
35
 
36
  def inference(lead, keywords = []):
37
  """
 
71
  generate = generate.replace("》","》\n").replace("。","。\n").replace(" ","")
72
  return generate
73
  ```
74
+ 感谢liangtongt指出Inference 代码运行时可能会发生的bug.
75
+
76
 
77
  ## Cherry picking
78
  大家下了模型,可以自己玩耍。