hysts HF staff commited on
Commit
4d55ef2
1 Parent(s): 2e7be44
Files changed (1) hide show
  1. app.py +2 -5
app.py CHANGED
@@ -14,11 +14,8 @@ DESCRIPTION = '# [BLIP-2](https://github.com/salesforce/LAVIS/tree/main/projects
14
 
15
  if (SPACE_ID := os.getenv('SPACE_ID')) is not None:
16
  DESCRIPTION += f'\n<p>For faster inference without waiting in queue, you may duplicate the space and upgrade to GPU in settings. <a href="https://huggingface.co/spaces/{SPACE_ID}?duplicate=true"><img style="display: inline; margin-top: 0em; margin-bottom: 0em" src="https://bit.ly/3gLdBN6" alt="Duplicate Space" /></a></p>'
17
-
18
- if torch.cuda.is_available():
19
- DESCRIPTION += '\n<p>Running on GPU 🔥</p>'
20
- else:
21
- DESCRIPTION += '\n<p>Running on CPU 🥶 This demo does not work on CPU.'
22
 
23
  device = torch.device('cuda:0' if torch.cuda.is_available() else 'cpu')
24
 
 
14
 
15
  if (SPACE_ID := os.getenv('SPACE_ID')) is not None:
16
  DESCRIPTION += f'\n<p>For faster inference without waiting in queue, you may duplicate the space and upgrade to GPU in settings. <a href="https://huggingface.co/spaces/{SPACE_ID}?duplicate=true"><img style="display: inline; margin-top: 0em; margin-bottom: 0em" src="https://bit.ly/3gLdBN6" alt="Duplicate Space" /></a></p>'
17
+ if not torch.cuda.is_available():
18
+ DESCRIPTION += '\n<p>Running on CPU 🥶 This demo does not work on CPU.</p>'
 
 
 
19
 
20
  device = torch.device('cuda:0' if torch.cuda.is_available() else 'cpu')
21