seawolf2357 commited on
Commit
3e9646a
Β·
1 Parent(s): f64375c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -157,23 +157,23 @@ try:
157
  except Exception as e:
158
  print(f"였λ₯˜ λ°œμƒ: {e}")
159
 
160
-
161
- # Gradio μΈν„°νŽ˜μ΄μŠ€λ₯Ό μœ„ν•œ ν•¨μˆ˜
162
  def gradio_generate_contents(user_content, brand_name):
163
- return generate_contents(user_content, brand_name) # 두 μž…λ ₯ λͺ¨λ‘ 전달
164
 
 
 
165
 
166
  # Gradio μΈν„°νŽ˜μ΄μŠ€ μˆ˜μ •
167
  iface = gr.Interface(
168
  fn=gradio_generate_contents, # 컨텐츠 생성 ν•¨μˆ˜
169
- inputs=[gr.Textbox(label="컨텐츠 ν…μŠ€νŠΈ"), gr.Textbox(label="λΈŒλžœλ“œλͺ…")], # gr.inputs λŒ€μ‹  gr μ‚¬μš©
170
- outputs=gr.Textbox(label="컨텐츠 ID") # gr.outputs λŒ€μ‹  gr μ‚¬μš©
171
  )
172
 
173
  status_iface = gr.Interface(
174
  fn=gradio_generate_status, # 컨텐츠 μƒνƒœ 확인 ν•¨μˆ˜
175
- inputs=gr.Textbox(label="컨텐츠 ID"), # gr.inputs λŒ€μ‹  gr μ‚¬μš©
176
- outputs=gr.Textbox(label="컨텐츠 μƒνƒœ λ˜λŠ” URL") # gr.outputs λŒ€μ‹  gr μ‚¬μš©
177
  )
178
 
179
  iface.launch()
 
157
  except Exception as e:
158
  print(f"였λ₯˜ λ°œμƒ: {e}")
159
 
 
 
160
  def gradio_generate_contents(user_content, brand_name):
161
+ return generate_contents(user_content, brand_name)
162
 
163
+ def gradio_generate_status(content_id):
164
+ return generate_status(content_id)
165
 
166
  # Gradio μΈν„°νŽ˜μ΄μŠ€ μˆ˜μ •
167
  iface = gr.Interface(
168
  fn=gradio_generate_contents, # 컨텐츠 생성 ν•¨μˆ˜
169
+ inputs=[gr.Textbox(label="컨텐츠 ν…μŠ€νŠΈ"), gr.Textbox(label="λΈŒλžœλ“œλͺ…")],
170
+ outputs=gr.Textbox(label="컨텐츠 ID")
171
  )
172
 
173
  status_iface = gr.Interface(
174
  fn=gradio_generate_status, # 컨텐츠 μƒνƒœ 확인 ν•¨μˆ˜
175
+ inputs=gr.Textbox(label="컨텐츠 ID"),
176
+ outputs=gr.Textbox(label="컨텐츠 μƒνƒœ λ˜λŠ” URL")
177
  )
178
 
179
  iface.launch()