myspace / app.py
lizhome's picture
Update app.py
e47e4fa
raw
history blame contribute delete
317 Bytes
import gradio as gr
# To convert your image file into the base64 format required by the API
gr.processing_utils.encode_url_or_file_to_base64(path)
# To convert the base64 image returned by the API to an image tmp file object
gr.processing_utils.decode_base64_to_file(encoding, encryption_key=None, file_path=None)