Spaces:
Sleeping
Sleeping
updates
Browse files- app.py +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="
|
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 |
-
|
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
|