def __init__(self, directory): DataSource.__init__(self, directory) """ Overload the directory path. """ self.directory = os.path.join(self.directory, 'Sentinel/') if not os.path.exists(self.directory): os.makedirs(self.directory) """ loads the model. """ print("INFO: downloading model. ") with requests.get( 'https://s3.eu-central-1.amazonaws.com/hrm-models/{}'.format( MODEL), stream=True) as r: with open('../Models/{}'.format(MODEL), 'wb') as f: f.write(r.content) #s3_download('hrm-models', MODEL, '../Models/{}'.format(MODEL)) print("INFO: loading model for Sentinel Images ...") self.net = tf.keras.models.load_model('../Models/{}'.format(MODEL), compile=False) self.net = tf.keras.models.Model( inputs=self.net.input, outputs=self.net.get_layer(LAYER).output)
def __init__(self, client): DataSource.__init__(self, client) self.content_type = 'video' self.tags = ['technology/technology'] self.show_elements = 'video' self.show_atoms = 'media'
def __init__(self, client): DataSource.__init__(self, client) self.tags = ['news/series/the-long-read,-tone/audio,-type/audio']
def __init__(self, client): DataSource.__init__(self, client) self.content_type = 'gallery' self.tags = ['childrens-books-site/series/how-to-draw'] self.show_elements = 'image'
def __init__(self, client): DataSource.__init__(self, client) self.content_type = 'video' self.tags = ['technology/technology'] self.show_elements = 'video'
def __init__(self, client): DataSource.__init__(self, client) self.content_type = 'video' self.tags = ['theguardian/series/how-to-dress'] # self.page_size = 1 self.show_elements = 'video'
def __init__(self, client): DataSource.__init__(self, client) self.tags = ['fashion/series/stylewatch'] # self.page_size = 1 self.show_elements = 'image'
def __init__(self, client): DataSource.__init__(self, client) self.content_type = 'video' self.tags = ['theguardian/series/how-to-dress'] # self.page_size = 1 self.show_elements = 'video'
def __init__(self, client): DataSource.__init__(self, client) self.content_type = 'gallery' self.tags = ['(fashion/series/fashion-for-all-ages|fashion/series/key-fashion-trends-of-the-season|fashion/series/fashion-line-up)'] # self.page_size = 1 self.show_elements = 'image'
def __init__(self, client): DataSource.__init__(self, client) self.tags = ['fashion/series/stylewatch'] # self.page_size = 1 self.show_elements = 'image'