Using Gradio API Replica URL's / Issue with --replica

When I rebuild a T4 GPU docker my URL keeps changing to indicate the replica. E.g.:

When I call the gradio app as API I would like to make the consumer impervious to a change in URL.

Will it work if I don’t include replica in the URL. e.g. ?

My calling code uses the URL as follows:
def transcribeWavtoTxt(filename):
from gradio_client import Client
with open(filename, “rb”) as f:
data =
client = Client(url)

    #old URL from last build ---      client = Client("")
    result = client.predict(
            "English",	# Literal['English', 'Spanish', 'French', 'German']  in 'Input audio is spoken in:' Dropdown component
            "English",	# Literal['English', 'Spanish', 'French', 'German']  in 'Transcribe in language:' Dropdown component
            True,	# bool  in 'Punctuation & Capitalization in transcript?' Checkbox component
    return result

Hello @awacke1, yes, you’re correct; there’s no need to be concerned with the replica suffix at the end of the URL, as your internal proxy will handle that aspect effectively.

1 Like

You’re the best. Thankyou sir for quick response. Much appreciated!


1 Like