Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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",
|
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")
|