Kaaaaaaa commited on
Commit
af3e7fb
·
verified ·
1 Parent(s): a6e12c5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -3
app.py CHANGED
@@ -1,3 +1,8 @@
1
- # Load model directly
2
- from transformers import AutoModelForCausalLM
3
- model = AutoModelForCausalLM.from_pretrained("IndexTeam/Index-1.9B-Character", trust_remote_code=True)
 
 
 
 
 
 
1
+ # Use a pipeline as a high-level helper
2
+ from transformers import pipeline
3
+
4
+ messages = [
5
+ {"role": "user", "content": "Who are you?"},
6
+ ]
7
+ pipe = pipeline("text-generation", model="IndexTeam/Index-1.9B-Character", trust_remote_code=True)
8
+ pipe(messages)