Kaaaaaaa commited on
Commit
d40d8d1
·
verified ·
1 Parent(s): 5582a5f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -8
app.py CHANGED
@@ -1,8 +1,3 @@
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)
 
1
+ # Load model directly
2
+ from transformers import AutoModelForCausalLM
3
+ model = AutoModelForCausalLM.from_pretrained("IndexTeam/Index-1.9B-Character", trust_remote_code=True)