Spaces:
Running
on
L4
Running
on
L4
bug fix for huggingface_hub
Browse files
app.py
CHANGED
@@ -15,9 +15,10 @@ import os
|
|
15 |
import importlib
|
16 |
import sys
|
17 |
|
18 |
-
|
|
|
19 |
|
20 |
-
def modify_dynamic_modules_file():
|
21 |
if os.path.exists(dynamic_modules_file):
|
22 |
with open(dynamic_modules_file, 'r') as file:
|
23 |
lines = file.readlines()
|
@@ -28,6 +29,9 @@ def modify_dynamic_modules_file():
|
|
28 |
else:
|
29 |
file.write(line)
|
30 |
|
|
|
|
|
|
|
31 |
import os
|
32 |
import sys
|
33 |
import argparse
|
|
|
15 |
import importlib
|
16 |
import sys
|
17 |
|
18 |
+
dynamic_modules_file1 = '/home/user/.pyenv/versions/3.10.16/lib/python3.10/site-packages/diffusers/utils/dynamic_modules_utils.py'
|
19 |
+
dynamic_modules_file2 = '/usr/local/lib/python3.10/site-packages/diffusers/utils/dynamic_modules_utils.py'
|
20 |
|
21 |
+
def modify_dynamic_modules_file(dynamic_modules_file):
|
22 |
if os.path.exists(dynamic_modules_file):
|
23 |
with open(dynamic_modules_file, 'r') as file:
|
24 |
lines = file.readlines()
|
|
|
29 |
else:
|
30 |
file.write(line)
|
31 |
|
32 |
+
modify_dynamic_modules_file(dynamic_modules_file1)
|
33 |
+
modify_dynamic_modules_file(dynamic_modules_file2)
|
34 |
+
|
35 |
import os
|
36 |
import sys
|
37 |
import argparse
|