Uranus commited on
Commit
2202faf
·
verified ·
1 Parent(s): 24898aa

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +12 -0
README.md ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ```
2
+ from transformers import AutoModelForCausalLM, AutoTokenizer
3
+
4
+ model_name = "shellchat-v1"
5
+ model = AutoModelForCausalLM.from_pretrained(model_name, trust_remote_code=True).to("cuda")
6
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
7
+
8
+ query = "hello world!"
9
+ history = []
10
+
11
+ response = model.chat(query, history, tokenizer)
12
+ ```