Update app.py
Browse files
app.py
CHANGED
|
@@ -1,5 +1,3 @@
|
|
| 1 |
-
import os
|
| 2 |
-
os.environ["SPACES_ZERO_GPU"] = "1"
|
| 3 |
import gradio as gr
|
| 4 |
import numpy as np
|
| 5 |
from PIL import Image, ImageDraw
|
|
@@ -1138,4 +1136,11 @@ with demo:
|
|
| 1138 |
outputs=[stream_image, output_bg_video, time_textbox]
|
| 1139 |
)
|
| 1140 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1141 |
demo.launch()
|
|
|
|
|
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import numpy as np
|
| 3 |
from PIL import Image, ImageDraw
|
|
|
|
| 1136 |
outputs=[stream_image, output_bg_video, time_textbox]
|
| 1137 |
)
|
| 1138 |
|
| 1139 |
+
# GPU ์ด๊ธฐํ (Spaces ํ๊ฒฝ์์ ํ์)
|
| 1140 |
+
try:
|
| 1141 |
+
if torch.cuda.is_available():
|
| 1142 |
+
dummy_gpu_init()
|
| 1143 |
+
except:
|
| 1144 |
+
pass
|
| 1145 |
+
|
| 1146 |
demo.launch()
|