itskavya commited on
Commit
4597b4d
·
verified ·
1 Parent(s): bd49eeb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -4,11 +4,11 @@ from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
4
  import nltk
5
  nltk.download('punkt_tab')
6
 
7
- # device="cuda"
8
  kw_model = KeyBERT()
9
  tokenizer = AutoTokenizer.from_pretrained("itskavya/t5-small-finetuned-titlegen2") # this is where the model is saved on hf, can load it n use it
10
  model = AutoModelForSeq2SeqLM.from_pretrained("itskavya/t5-small-finetuned-titlegen2")
11
- # model.to(device)
12
  max_input_length=512
13
 
14
  def predict(text):
 
4
  import nltk
5
  nltk.download('punkt_tab')
6
 
7
+ device="cpu"
8
  kw_model = KeyBERT()
9
  tokenizer = AutoTokenizer.from_pretrained("itskavya/t5-small-finetuned-titlegen2") # this is where the model is saved on hf, can load it n use it
10
  model = AutoModelForSeq2SeqLM.from_pretrained("itskavya/t5-small-finetuned-titlegen2")
11
+ model.to(device)
12
  max_input_length=512
13
 
14
  def predict(text):