teticio commited on
Commit
7bb535d
1 Parent(s): 1190c3d

download punkt for nltk

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -1,9 +1,12 @@
 
1
  import torch
2
  import numpy as np
3
  import gradio as gr
4
  from nltk import sent_tokenize
5
  from transformers import RobertaTokenizer, RobertaForMaskedLM
6
 
 
 
7
  cuda = torch.cuda.is_available()
8
 
9
  tokenizer = RobertaTokenizer.from_pretrained("roberta-large")
 
1
+ import nltk
2
  import torch
3
  import numpy as np
4
  import gradio as gr
5
  from nltk import sent_tokenize
6
  from transformers import RobertaTokenizer, RobertaForMaskedLM
7
 
8
+ nltk.download('punkt')
9
+
10
  cuda = torch.cuda.is_available()
11
 
12
  tokenizer = RobertaTokenizer.from_pretrained("roberta-large")