openfree commited on
Commit
bbf453e
Β·
verified Β·
1 Parent(s): 6b749d2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -36,7 +36,7 @@ def transcribe_summarize_and_blog(inputs, task):
36
  summary = hf_client.summarization(text)
37
  summary_text = summary["summary_text"] if summary and "summary_text" in summary else "μš”μ•½ν•  수 μ—†μŠ΅λ‹ˆλ‹€."
38
  except Exception as e:
39
- raise gr.Error(f"μš”μ•½ 쀑 였λ₯˜κ°€ λ°œμƒν–ˆμŠ΅λ‹ˆλ‹€: {e}")
40
 
41
  # λΈ”λ‘œκ·Έ ν¬μŠ€νŒ… 생성 μš”μ²­
42
  try:
@@ -46,7 +46,7 @@ def transcribe_summarize_and_blog(inputs, task):
46
  )
47
  blog_post_text = blog_post if isinstance(blog_post, str) else "λΈ”λ‘œκ·Έ ν¬μŠ€νŒ…μ„ 생성할 수 μ—†μŠ΅λ‹ˆλ‹€."
48
  except Exception as e:
49
- raise gr.Error(f"λΈ”λ‘œκ·Έ κΈ€ 생성 쀑 였λ₯˜κ°€ λ°œμƒν–ˆμŠ΅λ‹ˆλ‹€: {e}")
50
 
51
  return {
52
  "transcribed_text": text,
 
36
  summary = hf_client.summarization(text)
37
  summary_text = summary["summary_text"] if summary and "summary_text" in summary else "μš”μ•½ν•  수 μ—†μŠ΅λ‹ˆλ‹€."
38
  except Exception as e:
39
+ summary_text = f"μš”μ•½ 쀑 였λ₯˜κ°€ λ°œμƒν–ˆμŠ΅λ‹ˆλ‹€: {e}"
40
 
41
  # λΈ”λ‘œκ·Έ ν¬μŠ€νŒ… 생성 μš”μ²­
42
  try:
 
46
  )
47
  blog_post_text = blog_post if isinstance(blog_post, str) else "λΈ”λ‘œκ·Έ ν¬μŠ€νŒ…μ„ 생성할 수 μ—†μŠ΅λ‹ˆλ‹€."
48
  except Exception as e:
49
+ blog_post_text = f"λΈ”λ‘œκ·Έ κΈ€ 생성 쀑 였λ₯˜κ°€ λ°œμƒν–ˆμŠ΅λ‹ˆλ‹€: {e}"
50
 
51
  return {
52
  "transcribed_text": text,