Stanislas commited on
Commit
cee64b2
1 Parent(s): 1be049c

Update README

Browse files
Files changed (1) hide show
  1. README.md +3 -3
README.md CHANGED
@@ -55,13 +55,13 @@ model = AutoModel.from_pretrained("THUDM/codegeex2-6b", trust_remote_code=True,
55
  model = model.eval()
56
 
57
  # remember adding a language tag for better performance
58
- prompt = "# language: python\n# write a bubble sort function\n"
59
  inputs = tokenizer.encode(prompt, return_tensors="pt").to(model.device)
60
  outputs = model.generate(inputs, max_length=256, top_k=1)
61
  response = tokenizer.decode(outputs[0])
62
 
63
  >>> print(response)
64
- # language: python
65
  # write a bubble sort function
66
 
67
 
@@ -73,7 +73,7 @@ def bubble_sort(list):
73
  return list
74
 
75
 
76
- print(bubble_sort([5, 2, 4, 6, 1, 3]))
77
  ```
78
 
79
  关于更多的使用说明,请参考 CodeGeeX2 的 [Github Repo](https://github.com/THUDM/CodeGeeX2)。
 
55
  model = model.eval()
56
 
57
  # remember adding a language tag for better performance
58
+ prompt = "# language: Python\n# write a bubble sort function\n"
59
  inputs = tokenizer.encode(prompt, return_tensors="pt").to(model.device)
60
  outputs = model.generate(inputs, max_length=256, top_k=1)
61
  response = tokenizer.decode(outputs[0])
62
 
63
  >>> print(response)
64
+ # language: Python
65
  # write a bubble sort function
66
 
67
 
 
73
  return list
74
 
75
 
76
+ print(bubble_sort([5, 2, 1, 8, 4]))
77
  ```
78
 
79
  关于更多的使用说明,请参考 CodeGeeX2 的 [Github Repo](https://github.com/THUDM/CodeGeeX2)。