seawolf2357 commited on
Commit
244d581
Β·
1 Parent(s): 36e0165

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -4
app.py CHANGED
@@ -120,14 +120,17 @@ def generate_status(content_id):
120
  def gradio_generate_status(content_id):
121
  download_url = generate_status(content_id)
122
  if download_url != 'FAILED':
123
- return f"λ‹€μš΄λ‘œλ“œ 링크: {download_url}"
124
  else:
125
- return "컨텐츠 생성 μ‹€νŒ¨ λ˜λŠ” IDκ°€ 잘λͺ»λ˜μ—ˆμŠ΅λ‹ˆλ‹€."
126
 
127
  status_iface = gr.Interface(
128
- fn=gradio_generate_status, # 컨텐츠 μƒνƒœ 확인 및 λ‹€μš΄λ‘œλ“œ 링크 제곡 ν•¨μˆ˜
129
  inputs=gr.Textbox(label="컨텐츠 ID"),
130
- outputs=gr.Textbox(label="λ‹€μš΄λ‘œλ“œ 링크 λ˜λŠ” λ©”μ‹œμ§€")
 
 
 
131
  )
132
 
133
  status_iface.launch()
 
120
  def gradio_generate_status(content_id):
121
  download_url = generate_status(content_id)
122
  if download_url != 'FAILED':
123
+ return download_url, requests.get(download_url).content
124
  else:
125
+ return "컨텐츠 생성 μ‹€νŒ¨ λ˜λŠ” IDκ°€ 잘λͺ»λ˜μ—ˆμŠ΅λ‹ˆλ‹€.", None
126
 
127
  status_iface = gr.Interface(
128
+ fn=gradio_generate_status,
129
  inputs=gr.Textbox(label="컨텐츠 ID"),
130
+ outputs=[
131
+ gr.Textbox(label="λ‹€μš΄λ‘œλ“œ URL"),
132
+ gr.File(label="λ‹€μš΄λ‘œλ“œ λ²„νŠΌ")
133
+ ]
134
  )
135
 
136
  status_iface.launch()