File size: 244 Bytes
2eafbc4
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
import urllib

from inference.core.env import LICENSE_SERVER


def wrap_url(url: str) -> str:
    if not LICENSE_SERVER:
        return url
    return f"http://{LICENSE_SERVER}/proxy?url=" + urllib.parse.quote(
        url, safe="~()*!'"
    )