seawolf2357 commited on
Commit
fbc4ac6
Β·
verified Β·
1 Parent(s): 0936be5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -4
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=[gr.Textbox(label="컨텐츠 ID"),
91
- gr.Markdown("λΉ„λ””μ˜€ 슀크립트 μžλ™ 생성 클릭: [μ—¬κΈ°λ₯Ό ν΄λ¦­ν•˜μ„Έμš”](https://seawolf2357-hyejascript.hf.space)")
 
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,