Spaces:
Build error
Build error
Renegadesoffun
commited on
Commit
Β·
af7e733
1
Parent(s):
4b5703e
Updated for CPU usage
Browse files- app.py +2 -1
- requirements.txt +2 -2
app.py
CHANGED
@@ -8,7 +8,8 @@ model_name = "microsoft/DialoGPT-small"
|
|
8 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
9 |
|
10 |
model = AutoModelForCausalLM.from_pretrained(model_name)
|
11 |
-
chat_pipeline = pipeline("text-generation", model=model, tokenizer=tokenizer, device
|
|
|
12 |
|
13 |
# Streamlit UI
|
14 |
st.title("Buddy Christ Chatbot π")
|
|
|
8 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
9 |
|
10 |
model = AutoModelForCausalLM.from_pretrained(model_name)
|
11 |
+
chat_pipeline = pipeline("text-generation", model=model, tokenizer=tokenizer, device=-1, truncation=True, max_length=1000)
|
12 |
+
|
13 |
|
14 |
# Streamlit UI
|
15 |
st.title("Buddy Christ Chatbot π")
|
requirements.txt
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
torch
|
2 |
-
torchvision
|
3 |
transformers
|
4 |
streamlit
|
|
|
1 |
+
torch==1.9.0+cpu
|
2 |
+
torchvision==0.10.0+cpu
|
3 |
transformers
|
4 |
streamlit
|