B2BMGMT_Cartoonize / video_api.py
imseldrith's picture
Upload folder using huggingface_hub (#1)
be6c755 verified
raw
history blame contribute delete
458 Bytes
import Algorithmia
with open("algo.txt", "r") as infile:
client_key = infile.read()
client = Algorithmia.client(client_key)
algo = client.algo('tjdevworks/cartoonizer/2.2.2')
algo.set_options(timeout=300)
def api_request(input_file_uri):
# API call for cartoonization.
input = {"data_uri": input_file_uri,
"data_type": 1,
"datastore": ""
}
response = algo.pipe(input).result
return response