Spaces:
Running
on
Zero
Running
on
Zero
Add wordlist
Browse files
app.py
CHANGED
@@ -5,7 +5,11 @@ import random
|
|
5 |
import numpy as np
|
6 |
import torch
|
7 |
from torchvision.transforms.functional import center_crop
|
|
|
8 |
|
|
|
|
|
|
|
9 |
try:
|
10 |
# Try to install detectron2 from source. Needed for semseg plotting functionality.
|
11 |
os.system("python -m pip install 'git+https://github.com/facebookresearch/detectron2.git'")
|
|
|
5 |
import numpy as np
|
6 |
import torch
|
7 |
from torchvision.transforms.functional import center_crop
|
8 |
+
from datasets import load_dataset
|
9 |
|
10 |
+
|
11 |
+
word_list_dataset = load_dataset("EPFL-VILAB/4m-wordlist", data_files="list.txt", use_auth_token=True)
|
12 |
+
word_list = word_list_dataset["train"]['text']
|
13 |
try:
|
14 |
# Try to install detectron2 from source. Needed for semseg plotting functionality.
|
15 |
os.system("python -m pip install 'git+https://github.com/facebookresearch/detectron2.git'")
|