Spaces:
Build error
Build error
Upload folder using huggingface_hub
Browse files- app.py +1 -3
- requirements.txt +1 -1
app.py
CHANGED
@@ -1,5 +1,3 @@
|
|
1 |
-
from IPython.display import clear_output, Image
|
2 |
-
import argparse
|
3 |
import numpy as np
|
4 |
import random
|
5 |
from PIL import Image
|
@@ -12,7 +10,7 @@ import torchvision.transforms as transforms
|
|
12 |
from PIL import Image
|
13 |
|
14 |
evice = torch.device('cpu')
|
15 |
-
model = tag2text(pretrained='
|
16 |
model.threshold = 0.68
|
17 |
model.eval()
|
18 |
|
|
|
|
|
|
|
1 |
import numpy as np
|
2 |
import random
|
3 |
from PIL import Image
|
|
|
10 |
from PIL import Image
|
11 |
|
12 |
evice = torch.device('cpu')
|
13 |
+
model = tag2text(pretrained='tag2text.pth', image_size=384, vit='swin_b')
|
14 |
model.threshold = 0.68
|
15 |
model.eval()
|
16 |
|
requirements.txt
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
timm==0.4.12
|
2 |
-
transformers
|
3 |
fairscale==0.4.4
|
4 |
pycocoevalcap
|
5 |
torch
|
|
|
1 |
timm==0.4.12
|
2 |
+
transformers
|
3 |
fairscale==0.4.4
|
4 |
pycocoevalcap
|
5 |
torch
|