Renegadesoffun commited on
Commit
af7e733
Β·
1 Parent(s): 4b5703e

Updated for CPU usage

Browse files
Files changed (2) hide show
  1. app.py +2 -1
  2. 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=0, truncation=True, max_length=1000)
 
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