Spaces:
Sleeping
Sleeping
drewThomasson
commited on
Commit
•
6001005
1
Parent(s):
aa74243
Update app.py
Browse files
app.py
CHANGED
@@ -20,8 +20,14 @@ import gradio as gr
|
|
20 |
from gradio import Progress
|
21 |
import urllib.request
|
22 |
import zipfile
|
|
|
|
|
|
|
23 |
nltk.download('punkt_tab')
|
24 |
|
|
|
|
|
|
|
25 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
26 |
print(f"Device selected is: {device}")
|
27 |
|
|
|
20 |
from gradio import Progress
|
21 |
import urllib.request
|
22 |
import zipfile
|
23 |
+
import MeCab
|
24 |
+
import unidic
|
25 |
+
|
26 |
nltk.download('punkt_tab')
|
27 |
|
28 |
+
# Download UniDic if it's not already installed
|
29 |
+
unidic.download()
|
30 |
+
|
31 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
32 |
print(f"Device selected is: {device}")
|
33 |
|