# import gradio as gr | |
# from transformers import pipeline | |
# # Hugging Face ์ด๋ฏธ์ง ์์ฑ ๋ชจ๋ธ ๋ก๋ | |
# image_generator = pipeline("image-generation", model="CompVis/stable-diffusion-v1-4") | |
# # ํจ์ ์ ์ | |
# def generate_image(prompt): | |
# result = image_generator(prompt) | |
# return result[0]["image"] | |
# # Gradio ์ธํฐํ์ด์ค | |
# demo = gr.Interface( | |
# fn=generate_image, # ํจ์ ์ฐ๊ฒฐ | |
# inputs=gr.Textbox(label="Image Prompt"), # ์ ๋ ฅ ํ ์คํธ ๋ฐ์ค | |
# outputs="image", # ์ถ๋ ฅ ์ด๋ฏธ์ง | |
# title="Image Generation with Stable Diffusion", | |
# description="Enter a prompt, and the Stable Diffusion model will generate an image.", | |
# ) | |
# # ์ธํฐํ์ด์ค ์คํ | |
# if __name__ == "__main__": | |
# demo.launch() | |