Spaces:
Running
Running
Update gradio_app.py
Browse files- gradio_app.py +5 -2
gradio_app.py
CHANGED
@@ -7,7 +7,7 @@ os.makedirs(result_dir, exist_ok=True)
|
|
7 |
|
8 |
is_shared_ui = True if "fffiloni/Paints-UNDO" in os.environ['SPACE_ID'] else False
|
9 |
|
10 |
-
is_gpu_associated = torch.cuda.is_available()
|
11 |
|
12 |
import subprocess
|
13 |
from subprocess import getoutput
|
@@ -26,7 +26,10 @@ import random
|
|
26 |
import gradio as gr
|
27 |
import numpy as np
|
28 |
import wd14tagger
|
29 |
-
|
|
|
|
|
|
|
30 |
import uuid
|
31 |
|
32 |
from PIL import Image
|
|
|
7 |
|
8 |
is_shared_ui = True if "fffiloni/Paints-UNDO" in os.environ['SPACE_ID'] else False
|
9 |
|
10 |
+
is_gpu_associated = torch.cuda.is_available() else False
|
11 |
|
12 |
import subprocess
|
13 |
from subprocess import getoutput
|
|
|
26 |
import gradio as gr
|
27 |
import numpy as np
|
28 |
import wd14tagger
|
29 |
+
|
30 |
+
if is_gpu_associated:
|
31 |
+
import memory_management
|
32 |
+
|
33 |
import uuid
|
34 |
|
35 |
from PIL import Image
|