zf.write(image_path, arcname=os.path.basename(image_path)) 5b56c89 verified Fabrice-TIERCELIN commited on 12 days ago
def save_on_path(img: Image, filename: str, format_: str = None) -> Path: 9f79eb1 verified Fabrice-TIERCELIN commited on 12 days ago
return infer(prompt, None, mode_choice, seed, randomize_seed, width, height, num_inference_steps, guidance_scale, prompt_upsampling) c687584 verified Fabrice-TIERCELIN commited on 12 days ago
return infer(prompt, [input_image], mode_choice, seed, randomize_seed, width, height, num_inference_steps, guidance_scale, prompt_upsampling) 5121d3a verified Fabrice-TIERCELIN commited on 12 days ago
input_image = gr.Image(label="Upload the image for editing", type="pil") 497db88 verified Fabrice-TIERCELIN commited on 12 days ago
js="document.getElementById('output_id').scrollIntoView()" 28cc584 verified Fabrice-TIERCELIN commited on 13 days ago
js="document.getElementById('output_id')?.scrollIntoView({behavior: 'smooth', block: 'start', inline: 'nearest'})" 90c61c1 verified Fabrice-TIERCELIN commited on 13 days ago
zf.write(image_path, arcname=os.path.basename(image_path)) e257b78 verified Fabrice-TIERCELIN commited on 17 days ago
zf.write(image_path, arcname=os.path.basename(filepath)) b41d562 verified Fabrice-TIERCELIN commited on 17 days ago
image_filename = re.sub(r"^.*[\/\\]([^\/\\]+)$", r"\1", image_path) bd03974 verified Fabrice-TIERCELIN commited on 17 days ago
print(str(len(gallery)) + " images zipped") 43742c6 verified Fabrice-TIERCELIN commited on 17 days ago
result_gallery = gr.Gallery(label = 'Downloadable results', show_label = True, interactive = False, elem_id = "gallery1") 1a26c5e verified Fabrice-TIERCELIN commited on 18 days ago
zip_path = export_compiled_transformers_to_zip(gallery) 5c9497f verified Fabrice-TIERCELIN commited on 18 days ago
# Import optimization and access compiled artifacts 3af8a0d verified Fabrice-TIERCELIN commited on 24 days ago
def export_compiled_transformers_to_zip() -> str: d8ae88b verified Fabrice-TIERCELIN commited on 25 days ago
download_button = gr.DownloadButton(elem_id="download_btn", interactive = True) a65d168 verified Fabrice-TIERCELIN commited on 27 days ago
download_button = gr.DownloadButton(elem_id="download_btn", interactive = False) 033c3c4 verified Fabrice-TIERCELIN commited on 27 days ago
if not str(err).startswith("No GPU is currently available for you after 60s"): 2e32c82 verified Fabrice-TIERCELIN commited on 27 days ago
print('e.message: ' + err.message) # No GPU is currently available for you after 60s 83b65bc verified Fabrice-TIERCELIN commited on 27 days ago