Spaces:
Sleeping
Sleeping
eaysu
commited on
Commit
•
94e2407
1
Parent(s):
93f6210
punk_tab added
Browse files
app.py
CHANGED
@@ -2,13 +2,10 @@ import gradio as gr
|
|
2 |
from transformers import MarianMTModel, MarianTokenizer
|
3 |
import torch
|
4 |
import nltk
|
5 |
-
import os
|
6 |
|
7 |
# Download punkt for sentence tokenization
|
8 |
-
|
9 |
-
|
10 |
-
nltk.download('punkt', download_dir=nltk_data_path)
|
11 |
-
nltk.data.path.append(nltk_data_path)
|
12 |
|
13 |
from nltk.tokenize import sent_tokenize
|
14 |
|
|
|
2 |
from transformers import MarianMTModel, MarianTokenizer
|
3 |
import torch
|
4 |
import nltk
|
|
|
5 |
|
6 |
# Download punkt for sentence tokenization
|
7 |
+
nltk.download('punkt')
|
8 |
+
nltk.download('punkt_tab')
|
|
|
|
|
9 |
|
10 |
from nltk.tokenize import sent_tokenize
|
11 |
|