gpucce commited on
Commit
0b63a96
1 Parent(s): 95c2912
Files changed (2) hide show
  1. app.py +2 -2
  2. requirements.txt +1 -1
app.py CHANGED
@@ -2,11 +2,11 @@ import gradio as gr
2
  import open_clip
3
  import torch
4
 
5
- device = torch.device("cuda")
6
 
7
  model, _, transform = open_clip.create_model_and_transforms(
8
  "coca_ViT-L-14",
9
- pretrained="hf-hub:laion2B-s13B-b90k-mscoco-2014.pt"
10
  )
11
 
12
  model.to(device)
2
  import open_clip
3
  import torch
4
 
5
+ device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
6
 
7
  model, _, transform = open_clip.create_model_and_transforms(
8
  "coca_ViT-L-14",
9
+ pretrained="mscoco_finetuned_laion2B-s13B-b90k"
10
  )
11
 
12
  model.to(device)
requirements.txt CHANGED
@@ -1,4 +1,4 @@
1
- git+https://github.com/mlfoundations/open_clip
2
  transformers
3
  --extra-index-url https://download.pytorch.org/whl/cu113
4
  torch
1
+ open_clip_torch
2
  transformers
3
  --extra-index-url https://download.pytorch.org/whl/cu113
4
  torch