Spaces:
Runtime error
Runtime error
jwyang
commited on
Commit
•
c7077ad
1
Parent(s):
893ea67
rm mslog
Browse files- .gitattributes +1 -0
- app.py +1 -2
.gitattributes
CHANGED
@@ -26,3 +26,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
26 |
*.zstandard filter=lfs diff=lfs merge=lfs -text
|
27 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
28 |
shiba.jpg filter=lfs diff=lfs merge=lfs -text
|
|
|
|
26 |
*.zstandard filter=lfs diff=lfs merge=lfs -text
|
27 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
28 |
shiba.jpg filter=lfs diff=lfs merge=lfs -text
|
29 |
+
in21k_yfcc14m_gcc15m_swin_base.pth filter=lfs diff=lfs merge=lfs -text
|
app.py
CHANGED
@@ -67,7 +67,7 @@ build model
|
|
67 |
'''
|
68 |
model = build_model(config)
|
69 |
|
70 |
-
url = '
|
71 |
checkpoint = torch.hub.load_state_dict_from_url(url=url, map_location="cpu", check_hash=True)
|
72 |
model.load_state_dict(checkpoint["model"])
|
73 |
model.eval()
|
@@ -140,6 +140,5 @@ gr.Interface(
|
|
140 |
["./elephants.png", "an elephant; an elephant walking in the river; four elephants walking in the river"],
|
141 |
["./apple_with_ipod.jpg", "an ipod; an apple with a write note 'ipod'; an apple"],
|
142 |
["./crowd2.jpg", "a street; a street with a woman walking in the middle; a street with a man walking in the middle"],
|
143 |
-
["./ms_logo.jpg", "A logo; A logo with blue and yellow and green and red tiles; A logo with black and yellow and green and red tiles"]
|
144 |
],
|
145 |
).launch()
|
|
|
67 |
'''
|
68 |
model = build_model(config)
|
69 |
|
70 |
+
url = './in21k_yfcc14m_gcc15m_swin_base.pth'
|
71 |
checkpoint = torch.hub.load_state_dict_from_url(url=url, map_location="cpu", check_hash=True)
|
72 |
model.load_state_dict(checkpoint["model"])
|
73 |
model.eval()
|
|
|
140 |
["./elephants.png", "an elephant; an elephant walking in the river; four elephants walking in the river"],
|
141 |
["./apple_with_ipod.jpg", "an ipod; an apple with a write note 'ipod'; an apple"],
|
142 |
["./crowd2.jpg", "a street; a street with a woman walking in the middle; a street with a man walking in the middle"],
|
|
|
143 |
],
|
144 |
).launch()
|