Ahsen Khaliq commited on
Commit
75b0726
1 Parent(s): b7ed221

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -1,5 +1,4 @@
1
  import os
2
- os.system("nvidia-smi")
3
  os.system("pip install --upgrade torch==1.9.1+cu111 torchvision==0.10.1+cu111 -f https://download.pytorch.org/whl/torch_stable.html")
4
  os.system("git clone https://github.com/openai/CLIP")
5
  os.system("pip install -e ./CLIP")
@@ -22,7 +21,7 @@ from tqdm.notebook import tqdm
22
  from torchvision.transforms import Compose, Resize, ToTensor, Normalize
23
  from einops import rearrange
24
  import gradio as gr
25
-
26
  device = torch.device('cuda:0')
27
  def fetch(url_or_path):
28
  if str(url_or_path).startswith('http://') or str(url_or_path).startswith('https://'):
 
1
  import os
 
2
  os.system("pip install --upgrade torch==1.9.1+cu111 torchvision==0.10.1+cu111 -f https://download.pytorch.org/whl/torch_stable.html")
3
  os.system("git clone https://github.com/openai/CLIP")
4
  os.system("pip install -e ./CLIP")
 
21
  from torchvision.transforms import Compose, Resize, ToTensor, Normalize
22
  from einops import rearrange
23
  import gradio as gr
24
+ print(torch.cuda.get_device_name(0))
25
  device = torch.device('cuda:0')
26
  def fetch(url_or_path):
27
  if str(url_or_path).startswith('http://') or str(url_or_path).startswith('https://'):