Spaces:
Sleeping
Sleeping
download punkt for nltk
Browse files
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")
|