admin
commited on
Commit
·
d1a8dc5
1
Parent(s):
f3c0783
Update vi_backbones.py
Browse files- vi_backbones.py +5 -5
vi_backbones.py
CHANGED
@@ -3,9 +3,9 @@ import re
|
|
3 |
import hashlib
|
4 |
import requests
|
5 |
import datasets
|
6 |
-
import subprocess
|
7 |
from bs4 import BeautifulSoup
|
8 |
-
subprocess.call(['pip', 'install', 'torchvision'])
|
9 |
|
10 |
_DBNAME = os.path.basename(__file__).split('.')[0]
|
11 |
_HOMEPAGE = "https://huggingface.co/datasets/george-chou/" + _DBNAME
|
@@ -89,7 +89,7 @@ class vi_backbones(datasets.GeneratorBasedBuilder):
|
|
89 |
ul = article.find('ul').find('ul')
|
90 |
in1k_v1, in1k_v2 = [], []
|
91 |
|
92 |
-
import torchvision.models as models
|
93 |
|
94 |
for li in ul.find_all('li'):
|
95 |
name = str(li.text)
|
@@ -107,8 +107,8 @@ class vi_backbones(datasets.GeneratorBasedBuilder):
|
|
107 |
if div_id.__contains__('_Weights'):
|
108 |
m_ver = div_id.split('_Weight')[0].lower()
|
109 |
|
110 |
-
if not hasattr(models, m_ver):
|
111 |
-
|
112 |
|
113 |
m_type = re.search('[a-zA-Z]+', m_ver).group(0)
|
114 |
|
|
|
3 |
import hashlib
|
4 |
import requests
|
5 |
import datasets
|
6 |
+
# import subprocess
|
7 |
from bs4 import BeautifulSoup
|
8 |
+
# subprocess.call(['pip', 'install', 'torchvision'])
|
9 |
|
10 |
_DBNAME = os.path.basename(__file__).split('.')[0]
|
11 |
_HOMEPAGE = "https://huggingface.co/datasets/george-chou/" + _DBNAME
|
|
|
89 |
ul = article.find('ul').find('ul')
|
90 |
in1k_v1, in1k_v2 = [], []
|
91 |
|
92 |
+
# import torchvision.models as models
|
93 |
|
94 |
for li in ul.find_all('li'):
|
95 |
name = str(li.text)
|
|
|
107 |
if div_id.__contains__('_Weights'):
|
108 |
m_ver = div_id.split('_Weight')[0].lower()
|
109 |
|
110 |
+
# if not hasattr(models, m_ver):
|
111 |
+
# continue
|
112 |
|
113 |
m_type = re.search('[a-zA-Z]+', m_ver).group(0)
|
114 |
|