seawolf2357 commited on
Commit
0f9b008
Β·
verified Β·
1 Parent(s): f2f2b35

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +29 -4
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()