Spaces:
Running
on
T4
Running
on
T4
Wrapped installing additional GPU dependencies in function and added spaces.GPU decorator.
Browse files
app.py
CHANGED
@@ -23,11 +23,15 @@ from enum import Enum
|
|
23 |
import os
|
24 |
os.environ["GRADIO_TEMP_DIR"] = os.path.join(os.getcwd(), "tmp")
|
25 |
|
|
|
26 |
# Installing dependencies not in requirements.txt
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
|
|
|
|
|
|
31 |
|
32 |
class AppSteps(Enum):
|
33 |
JUST_TEXT = 1
|
|
|
23 |
import os
|
24 |
os.environ["GRADIO_TEMP_DIR"] = os.path.join(os.getcwd(), "tmp")
|
25 |
|
26 |
+
@spaces.GPU
|
27 |
# Installing dependencies not in requirements.txt
|
28 |
+
def install_add_dependencies():
|
29 |
+
from subprocess import call
|
30 |
+
with open('./startup.sh', 'rb') as file:
|
31 |
+
script = file.read()
|
32 |
+
return call(script, shell=True)
|
33 |
+
|
34 |
+
install_add_dependencies()
|
35 |
|
36 |
class AppSteps(Enum):
|
37 |
JUST_TEXT = 1
|