Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -24,7 +24,7 @@ COMF_PATH = config('COMF_PATH')
|
|
24 |
|
25 |
import torch
|
26 |
|
27 |
-
|
28 |
|
29 |
print(f"Is CUDA available: {torch.cuda.is_available()}")
|
30 |
print(f"CUDA device: {torch.cuda.get_device_name(torch.cuda.current_device())}")
|
@@ -55,7 +55,7 @@ def check_server_ready():
|
|
55 |
return False
|
56 |
|
57 |
|
58 |
-
|
59 |
def generate_image(prompt, image):
|
60 |
previous_image = get_latest_image(OUTPUT_DIR)
|
61 |
|
|
|
24 |
|
25 |
import torch
|
26 |
|
27 |
+
import spaces
|
28 |
|
29 |
print(f"Is CUDA available: {torch.cuda.is_available()}")
|
30 |
print(f"CUDA device: {torch.cuda.get_device_name(torch.cuda.current_device())}")
|
|
|
55 |
return False
|
56 |
|
57 |
|
58 |
+
@spaces.GPU
|
59 |
def generate_image(prompt, image):
|
60 |
previous_image = get_latest_image(OUTPUT_DIR)
|
61 |
|