Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -79,7 +79,11 @@ def gradio_generate_status(content_id):
|
|
79 |
else:
|
80 |
return "컨ν
μΈ μμ± μ€ν¨ λλ IDκ° μλͺ»λμμ΅λλ€.", markdown_text
|
81 |
|
82 |
-
|
|
|
|
|
|
|
|
|
83 |
iface_create = gr.Interface(
|
84 |
fn=gradio_generate_contents,
|
85 |
inputs=[
|
@@ -87,10 +91,10 @@ iface_create = gr.Interface(
|
|
87 |
gr.Textbox(label="λΈλλλͺ
"),
|
88 |
gr.Dropdown(label="νλ©΄ λΉμ¨", choices=['portrait', 'square', 'landscape'], value='landscape'),
|
89 |
],
|
90 |
-
outputs=[
|
91 |
-
gr.
|
|
|
92 |
],
|
93 |
-
|
94 |
examples=[
|
95 |
[
|
96 |
"Nature Republic Super Aqua Max μ§μ± νΌλΆμ© νλ μ μν° ν¬λ¦Ό\nμλ¦λ€μ΄ μ¬μ±μκ² μ§μ νμνκ²μ 무μμΌκΉμ? μ§μ ν μλ¦λ€μμ 건κ°νκ³ λ§μ νΌλΆμ μμ΅λλ€.\n...",
|
@@ -105,6 +109,7 @@ iface_create = gr.Interface(
|
|
105 |
]
|
106 |
)
|
107 |
|
|
|
108 |
# μν νμΈ λ° λΉλμ€ λ€μ΄λ‘λ μΈν°νμ΄μ€
|
109 |
iface_status = gr.Interface(
|
110 |
fn=gradio_generate_status,
|
|
|
79 |
else:
|
80 |
return "컨ν
μΈ μμ± μ€ν¨ λλ IDκ° μλͺ»λμμ΅λλ€.", markdown_text
|
81 |
|
82 |
+
def gradio_generate_contents(user_content, brand_name, aspect_ratio):
|
83 |
+
content_id = generate_contents(user_content, brand_name, aspect_ratio)
|
84 |
+
markdown_text = "λΉλμ€ μ€ν¬λ¦½νΈ μλ μμ± ν΄λ¦: [μ¬κΈ°λ₯Ό ν΄λ¦νμΈμ](https://seawolf2357-hyejascript.hf.space)"
|
85 |
+
return content_id, markdown_text
|
86 |
+
|
87 |
iface_create = gr.Interface(
|
88 |
fn=gradio_generate_contents,
|
89 |
inputs=[
|
|
|
91 |
gr.Textbox(label="λΈλλλͺ
"),
|
92 |
gr.Dropdown(label="νλ©΄ λΉμ¨", choices=['portrait', 'square', 'landscape'], value='landscape'),
|
93 |
],
|
94 |
+
outputs=[
|
95 |
+
gr.Textbox(label="컨ν
μΈ ID"),
|
96 |
+
gr.Markdown() # λ§ν¬λ€μ΄ μΆλ ₯ μΆκ°
|
97 |
],
|
|
|
98 |
examples=[
|
99 |
[
|
100 |
"Nature Republic Super Aqua Max μ§μ± νΌλΆμ© νλ μ μν° ν¬λ¦Ό\nμλ¦λ€μ΄ μ¬μ±μκ² μ§μ νμνκ²μ 무μμΌκΉμ? μ§μ ν μλ¦λ€μμ 건κ°νκ³ λ§μ νΌλΆμ μμ΅λλ€.\n...",
|
|
|
109 |
]
|
110 |
)
|
111 |
|
112 |
+
|
113 |
# μν νμΈ λ° λΉλμ€ λ€μ΄λ‘λ μΈν°νμ΄μ€
|
114 |
iface_status = gr.Interface(
|
115 |
fn=gradio_generate_status,
|