Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -63,7 +63,6 @@ def generate_status(content_id):
|
|
63 |
else:
|
64 |
break
|
65 |
return 'FAILED'
|
66 |
-
|
67 |
# Gradio μΈν°νμ΄μ€ ν¨μ
|
68 |
def gradio_generate_contents(user_content, brand_name, aspect_ratio):
|
69 |
return generate_contents(user_content, brand_name, aspect_ratio)
|
@@ -86,17 +85,43 @@ iface_create = gr.Interface(
|
|
86 |
gr.Textbox(label="λΈλλλͺ
"),
|
87 |
gr.Dropdown(label="νλ©΄ λΉμ¨", choices=['portrait', 'square', 'landscape'], value='landscape')
|
88 |
],
|
89 |
-
outputs=gr.Textbox(label="컨ν
μΈ ID")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
)
|
91 |
|
92 |
# μν νμΈ λ° λΉλμ€ λ€μ΄λ‘λ μΈν°νμ΄μ€
|
93 |
iface_status = gr.Interface(
|
94 |
fn=gradio_generate_status,
|
95 |
inputs=gr.Textbox(label="컨ν
μΈ ID"),
|
96 |
-
outputs=gr.HTML(label="λ€μ΄λ‘λ λ§ν¬ λ° λΉλμ€")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
)
|
98 |
|
99 |
# λ μΈν°νμ΄μ€λ₯Ό νμΌλ‘ ꡬμ±
|
100 |
iface_combined = gr.TabbedInterface([iface_create, iface_status], ["컨ν
μΈ μμ±", "μν νμΈ λ° λ€μ΄λ‘λ"])
|
101 |
iface_combined.launch()
|
102 |
-
|
|
|
63 |
else:
|
64 |
break
|
65 |
return 'FAILED'
|
|
|
66 |
# Gradio μΈν°νμ΄μ€ ν¨μ
|
67 |
def gradio_generate_contents(user_content, brand_name, aspect_ratio):
|
68 |
return generate_contents(user_content, brand_name, aspect_ratio)
|
|
|
85 |
gr.Textbox(label="λΈλλλͺ
"),
|
86 |
gr.Dropdown(label="νλ©΄ λΉμ¨", choices=['portrait', 'square', 'landscape'], value='landscape')
|
87 |
],
|
88 |
+
outputs=gr.Textbox(label="컨ν
μΈ ID"),
|
89 |
+
|
90 |
+
examples=[
|
91 |
+
[
|
92 |
+
"""Nature Republic Super Aqua Max μ§μ± νΌλΆμ© νλ μ μν° ν¬λ¦Ό
|
93 |
+
μλ¦λ€μ΄ μ¬μ±μκ² μ§μ νμνκ²μ 무μμΌκΉμ? μ§μ ν μλ¦λ€μμ 건κ°νκ³ λ§μ νΌλΆμ μμ΅λλ€.
|
94 |
+
μλ¦λ€μμ μ¬λ¬κ°μ§ κΈ°μ€μ΄ μκ² μ§λ§, κΉ¨λν νΌλΆκ° κ·Έμ€ μΌλΈμ΄μ λ°νμ
λλ€.
|
95 |
+
μμ€ν λΉμ μ νΌλΆ 건κ°μ μν΄ λ³΄μ΅κ³Ό λ―Έλ°±μ κΈ°λ₯μ±μ κ°νν νμ μ μΈ νμ₯νμ μΆμ²ν©λλ€.
|
96 |
+
μ§κΈ λ°λ‘ μ°λ½μ£Όμλ©΄ μμΈ μλ΄λ₯Ό μ κ³΅ν΄ λ립λλ€.""",
|
97 |
+
"λ€μ΄μ²λ¦¬νΌλΈλ¦",
|
98 |
+
"landscape"
|
99 |
+
],
|
100 |
+
[
|
101 |
+
"""μΈμμ μμ΄ νλ³΅μ΄ λ¬΄μμΌκΉμ?
|
102 |
+
μΌμΈμμ λ°μ΄λκ³ μλ λ©μ§ κ°λ€μ 보면 κΈ°λΆμ΄ μ’μμ§λλ€.
|
103 |
+
λ΄κ³μμ μ‘Έκ³ μλ κ³ μμ΄λ€μ΄ μ¬λμ€λ½μ£ ?
|
104 |
+
ν볡μ κ²°μ½ λ©λ¦¬ μμ§ μμ΅λλ€. μ€λμ μμ€ν¨μ κ°μ¬ν©μλ€.""",
|
105 |
+
"ν볡",
|
106 |
+
"landscape"
|
107 |
+
]
|
108 |
+
]
|
109 |
)
|
110 |
|
111 |
# μν νμΈ λ° λΉλμ€ λ€μ΄λ‘λ μΈν°νμ΄μ€
|
112 |
iface_status = gr.Interface(
|
113 |
fn=gradio_generate_status,
|
114 |
inputs=gr.Textbox(label="컨ν
μΈ ID"),
|
115 |
+
outputs=gr.HTML(label="λ€μ΄λ‘λ λ§ν¬ λ° λΉλμ€"),
|
116 |
+
examples=[
|
117 |
+
["659f5a3f096a487442e72dee"],
|
118 |
+
["659f6651d4c72225a9895ebb"],
|
119 |
+
["659cb397cb76ef0bf866bea1"],
|
120 |
+
["659d36c2566250b231cffab1"],
|
121 |
+
["659b99911395c3bd1cc1165b"],
|
122 |
+
] # μμ μΆκ°
|
123 |
)
|
124 |
|
125 |
# λ μΈν°νμ΄μ€λ₯Ό νμΌλ‘ ꡬμ±
|
126 |
iface_combined = gr.TabbedInterface([iface_create, iface_status], ["컨ν
μΈ μμ±", "μν νμΈ λ° λ€μ΄λ‘λ"])
|
127 |
iface_combined.launch()
|
|