Spaces:
Paused
Paused
fix cache examples error (#4)
Browse files- fix cache examples error (c247f505453206a1df3e1a800615505ed6a6b9a3)
Co-authored-by: Radamés Ajna <radames@users.noreply.huggingface.co>
109 unmodified lines110111112113114115285 unmodified lines401402403404405406407408409410411412109 unmodified lines]return casedef convert_from_cv2_to_image(img: np.ndarray) -> Image:return Image.fromarray(cv2.cvtColor(img, cv2.COLOR_BGR2RGB))285 unmodified linesexamples=get_example(),inputs=[face_files, prompt, style, negative_prompt],run_on_click=True,fn=upload_example_to_gallery,outputs=[uploaded_faces, clear_button_face, face_files],cache_examples=True)gr.Markdown(article)demo.queue(api_open=False)demo.launch()109 unmodified lines110111112113114115116117118285 unmodified lines404405406407408409410411412413414415416109 unmodified lines]return casedef run_for_examples(face_files, prompt, style, negative_prompt):return generate_image(face_files, None, prompt, negative_prompt, style, True, 30, 0.8, 0.8, 5, 42)def convert_from_cv2_to_image(img: np.ndarray) -> Image:return Image.fromarray(cv2.cvtColor(img, cv2.COLOR_BGR2RGB))285 unmodified linesexamples=get_example(),inputs=[face_files, prompt, style, negative_prompt],run_on_click=True,fn=run_for_examples,outputs=[gallery, usage_tips],cache_examples=True)gr.Markdown(article)demo.queue(api_open=False)demo.launch()
app.py+6-2