Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -51,12 +51,12 @@ def image_create(seed: int, truncation_psi: float):
|
|
| 51 |
return imgs_arr[0]/255
|
| 52 |
|
| 53 |
def main():
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
device = th.device()
|
| 61 |
iface = gr.Interface(
|
| 62 |
image_create,
|
|
@@ -66,7 +66,7 @@ def main():
|
|
| 66 |
0, 2, step=0.05, default=0.7, label='Truncation psi'),
|
| 67 |
],
|
| 68 |
gr.outputs.Image(type='numpy', label='Output'),
|
| 69 |
-
title=
|
| 70 |
description=DESCRIPTION,
|
| 71 |
article=ARTICLE,
|
| 72 |
)
|
|
|
|
| 51 |
return imgs_arr[0]/255
|
| 52 |
|
| 53 |
def main():
|
| 54 |
+
torch.cuda.init()
|
| 55 |
+
if torch.cuda.is_initialized():
|
| 56 |
+
ini = "True1"
|
| 57 |
+
else:
|
| 58 |
+
ini = "False1"
|
| 59 |
+
result = subprocess.check_output(['nvidia-smi'])
|
| 60 |
device = th.device()
|
| 61 |
iface = gr.Interface(
|
| 62 |
image_create,
|
|
|
|
| 66 |
0, 2, step=0.05, default=0.7, label='Truncation psi'),
|
| 67 |
],
|
| 68 |
gr.outputs.Image(type='numpy', label='Output'),
|
| 69 |
+
title=ini,
|
| 70 |
description=DESCRIPTION,
|
| 71 |
article=ARTICLE,
|
| 72 |
)
|