Spaces:
Runtime error
Runtime error
ffreemt
commited on
Commit
•
f820383
1
Parent(s):
f719193
Update cuda().half()
Browse files- .flake8 +21 -0
- .gitignore +1 -0
- app.py +1 -1
.flake8
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
[flake8]
|
2 |
+
ignore =
|
3 |
+
# E203 whitespace before ':'
|
4 |
+
E203
|
5 |
+
D203,
|
6 |
+
# line too long
|
7 |
+
E501
|
8 |
+
per-file-ignores =
|
9 |
+
# imported but unused
|
10 |
+
# __init__.py: F401
|
11 |
+
test_*.py: F401
|
12 |
+
exclude =
|
13 |
+
.git,
|
14 |
+
__pycache__,
|
15 |
+
docs/source/conf.py,
|
16 |
+
old,
|
17 |
+
build,
|
18 |
+
dist,
|
19 |
+
.venv
|
20 |
+
pad*.py
|
21 |
+
max-complexity = 25
|
.gitignore
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
call-activate.bat
|
app.py
CHANGED
@@ -35,7 +35,7 @@ has_cuda = torch.cuda.is_available()
|
|
35 |
if has_cuda:
|
36 |
model = AutoModel.from_pretrained(
|
37 |
model_name, trust_remote_code=True
|
38 |
-
).cuda() # 3.92G
|
39 |
else:
|
40 |
model = AutoModel.from_pretrained(
|
41 |
model_name, trust_remote_code=True
|
|
|
35 |
if has_cuda:
|
36 |
model = AutoModel.from_pretrained(
|
37 |
model_name, trust_remote_code=True
|
38 |
+
).cuda().half() # 3.92G
|
39 |
else:
|
40 |
model = AutoModel.from_pretrained(
|
41 |
model_name, trust_remote_code=True
|