File size: 499 Bytes
8f68280 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
import requests
class Endpoint:
def __init__(self):
self.config_path = "https://storage.googleapis.com/sfr-vision-language-research/LAVIS/projects/blip2/config.json"
self._url = None
@property
def url(self):
if self._url is None:
self._url = self.get_url()
return self._url
def get_url(self):
response = requests.get(self.config_path)
config = response.json()
return config["endpoint"]
|