Spaces:
Build error
Build error
tweaks
Browse files- app.py +1 -3
- requirements.txt +0 -1
app.py
CHANGED
@@ -10,7 +10,6 @@ import matplotlib.pyplot as plt
|
|
10 |
from models import get_model
|
11 |
from dotmap import DotMap
|
12 |
from PIL import Image
|
13 |
-
from pyshorteners import Shortener
|
14 |
|
15 |
#os.environ['TERM'] = 'linux'
|
16 |
#os.environ['TERMINFO'] = '/etc/terminfo'
|
@@ -114,9 +113,8 @@ def inference(query, labels, n_supp=10):
|
|
114 |
x_im = Image.open(x.path)
|
115 |
|
116 |
# vis
|
117 |
-
url_shortener = Shortener('Bitly', bitly_token='YOUR TOKEN')
|
118 |
axs[idx, j].imshow(x_im)
|
119 |
-
axs[idx, j].set_title(f'{y}{j}:{
|
120 |
axs[idx, j].axis('off')
|
121 |
|
122 |
x_im = preprocess(x_im) # (3, H, W)
|
|
|
10 |
from models import get_model
|
11 |
from dotmap import DotMap
|
12 |
from PIL import Image
|
|
|
13 |
|
14 |
#os.environ['TERM'] = 'linux'
|
15 |
#os.environ['TERMINFO'] = '/etc/terminfo'
|
|
|
113 |
x_im = Image.open(x.path)
|
114 |
|
115 |
# vis
|
|
|
116 |
axs[idx, j].imshow(x_im)
|
117 |
+
axs[idx, j].set_title(f'{y}{j}:{x.url}')
|
118 |
axs[idx, j].axis('off')
|
119 |
|
120 |
x_im = preprocess(x_im) # (3, H, W)
|
requirements.txt
CHANGED
@@ -10,4 +10,3 @@ ml-collections
|
|
10 |
ftfy
|
11 |
tensorboard
|
12 |
Google-Images-Search
|
13 |
-
pyshorteners
|
|
|
10 |
ftfy
|
11 |
tensorboard
|
12 |
Google-Images-Search
|
|