feng2022 commited on
Commit
b954cf5
·
1 Parent(s): 542bed9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
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
- #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,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=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
  )