Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -57,12 +57,39 @@ if __name__ == "__main__":
|
|
57 |
images = np.clip(images / 2 + 0.5, 0, 1)
|
58 |
return im.fromarray((images[0] * 255).astype(np.uint8))
|
59 |
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
|
67 |
demo.launch()
|
68 |
|
|
|
57 |
images = np.clip(images / 2 + 0.5, 0, 1)
|
58 |
return im.fromarray((images[0] * 255).astype(np.uint8))
|
59 |
|
60 |
+
with gr.Blocks() as demo:
|
61 |
+
gr.Markdown(
|
62 |
+
"""
|
63 |
+
# KoFace AI - ํ๊ตญ์ธ ๋ชฝํ์ฃผ ์์ฑ๊ธฐ
|
64 |
+
* ๋ชฝํ์ฃผ๋ฅผ ์ค๋ช
ํ๋ ํ
์คํธ๋ฅผ ์
๋ ฅํ๊ณ '์์ฑํ๊ธฐ' ๋ฒํผ์ ๋๋ฌ์ฃผ์ธ์.
|
65 |
+
|
66 |
+
* **์ฐธ๊ณ **: ํ์ฌ ๋ฌด๋ฃ ํฐ์ด๋ฅผ ์ด์ฉํ๊ณ ์์ด, **์์ฑ์ ์ฝ 10๋ถ ์ ๋์ ์๊ฐ**์ด ๊ฑธ๋ฆด ์ ์์ต๋๋ค.
|
67 |
+
|
68 |
+
* ์ด AI๋ Latent Diffusion Model์ ์ง์ ๊ตฌํํ์ฌ ๋ง๋ค์์ต๋๋ค. ์์ธํ ์ฝ๋๋ ์คํ ๊ฒฐ๊ณผ๋ GitHub ์ ์ฅ์๋ฅผ ์ฐธ๊ณ ํด ์ฃผ์ธ์.
|
69 |
+
|
70 |
+
๐ [GitHub ์ ์ฅ์ ๋ฐ๋ก๊ฐ๊ธฐ](https://github.com/Won-Seong/simple-latent-diffusion-model)
|
71 |
+
|
72 |
+
|
73 |
+
"""
|
74 |
+
)
|
75 |
+
|
76 |
+
with gr.Row():
|
77 |
+
with gr.Column():
|
78 |
+
text_input = gr.Textbox(
|
79 |
+
placeholder="๋ชฝํ์ฃผ๋ฅผ ์ค๋ช
ํ๋ ํ
์คํธ๋ฅผ ์
๋ ฅํ์ธ์.",
|
80 |
+
label="Text Condition"
|
81 |
+
)
|
82 |
+
guidance_slider = gr.Slider(
|
83 |
+
0, 10, value=2,
|
84 |
+
label="Guidance Scale",
|
85 |
+
info="์ด ์ซ์๊ฐ ํฌ๋ฉด ํด์๋ก ์
๋ ฅ ํ
์คํธ๋ฅผ ๋ ๊ฐํ๊ฒ ์ด์ฉํ์ฌ ๋ชฝํ์ฃผ๋ฅผ ์์ฑํฉ๋๋ค."
|
86 |
+
)
|
87 |
+
submit_btn = gr.Button("์์ฑํ๊ธฐ")
|
88 |
+
|
89 |
+
with gr.Column():
|
90 |
+
image_output = gr.Image(label="์์ฑ๋ ๋ชฝํ์ฃผ")
|
91 |
+
|
92 |
+
submit_btn.click(fn=greet, inputs=[text_input, guidance_slider], outputs=image_output)
|
93 |
|
94 |
demo.launch()
|
95 |
|