pyresearch commited on
Commit
476f787
·
verified ·
1 Parent(s): 0c95c30

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -4,7 +4,7 @@ import torch
4
 
5
  # Load model and tokenizer
6
  tokenizer = AutoTokenizer.from_pretrained("microsoft/phi-2", trust_remote_code=True)
7
- model = AutoModelForCausalLM.from_pretrained("microsoft/phi-2", torch_dtype="auto", device_map="auto", trust_remote_code=True)
8
 
9
  # Streamlit app
10
  st.title("Text Generation with Transformers")
 
4
 
5
  # Load model and tokenizer
6
  tokenizer = AutoTokenizer.from_pretrained("microsoft/phi-2", trust_remote_code=True)
7
+ model = AutoModelForCausalLM.from_pretrained("microsoft/phi-2", device="cpu", trust_remote_code=True)
8
 
9
  # Streamlit app
10
  st.title("Text Generation with Transformers")