AIRider commited on
Commit
108f0d2
Β·
verified Β·
1 Parent(s): 943bd88

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -5
app.py CHANGED
@@ -91,7 +91,7 @@ def summarize_text(title, description, text):
91
  - 유튜브λ₯Ό 처음 μ‹œμž‘ν•˜λŠ” μ‚¬λžŒλ“€μ€ κ΅¬λ…μž μˆ˜μ™€ μ‘°νšŒμˆ˜μ— 큰 관심을 두고 맀일 유튜브 μŠ€νŠœλ””μ˜€λ₯Ό ν™•μΈν•˜κ²Œ λœλ‹€.
92
  - κ·ΈλŸ¬λ‚˜ κ΅¬λ…μžκ°€ 100λͺ…, 1,000λͺ…에 λ„λ‹¬ν•˜λŠ” κ²ƒλ§ŒμœΌλ‘œλŠ” 지속적인 μ„±μž₯에 도움이 λ˜μ§€ μ•ŠλŠ”λ‹€.
93
  - κ΅¬λ…μž μˆ˜κ°€ λŠ˜μ–΄λ‚œ 후에도 유튜브 채널 μš΄μ˜μ— λŒ€ν•œ 감을 μž‘μ§€ λͺ»ν•΄ ν¬κΈ°ν•˜λŠ” κ²½μš°κ°€ λ§Žλ‹€.
94
- 17. 각 μ„Ήμ…˜μ—μ„œ μ†Œμ£Όμ œμ˜ 핡심뢀뢄은 <span style="background-color: #FFDAB9; font-weight: bold;">νƒœκ·Έλ‘œ κ°μ‹Έμ„œ ν•˜μ΄λΌμ΄νŠΈν•˜λΌ
95
 
96
  제λͺ©: {title}
97
  μ„€λͺ…: {description}
@@ -164,16 +164,18 @@ def analyze(url):
164
  elif line.startswith('### '):
165
  line = f"<h3>{line[4:]}</h3>"
166
  else:
 
 
167
  line = f"<p>{line}</p>"
168
  formatted_lines.append(line)
169
 
170
  formatted_summary = '\n'.join(formatted_lines)
171
 
172
  summary_content = f"""<div style="background-color: #e6f3ff; padding: 20px; border-radius: 10px; margin-top: 20px;">
173
- <h3>μš”μ•½</h3>
174
- <h2>{title}</h2>
175
- {formatted_summary}
176
- </div>"""
177
 
178
  # μ΅œμ’… κ²°κ³Ό ν‘œμ‹œ
179
  yield script_content, summary_content
 
91
  - 유튜브λ₯Ό 처음 μ‹œμž‘ν•˜λŠ” μ‚¬λžŒλ“€μ€ κ΅¬λ…μž μˆ˜μ™€ μ‘°νšŒμˆ˜μ— 큰 관심을 두고 맀일 유튜브 μŠ€νŠœλ””μ˜€λ₯Ό ν™•μΈν•˜κ²Œ λœλ‹€.
92
  - κ·ΈλŸ¬λ‚˜ κ΅¬λ…μžκ°€ 100λͺ…, 1,000λͺ…에 λ„λ‹¬ν•˜λŠ” κ²ƒλ§ŒμœΌλ‘œλŠ” 지속적인 μ„±μž₯에 도움이 λ˜μ§€ μ•ŠλŠ”λ‹€.
93
  - κ΅¬λ…μž μˆ˜κ°€ λŠ˜μ–΄λ‚œ 후에도 유튜브 채널 μš΄μ˜μ— λŒ€ν•œ 감을 μž‘μ§€ λͺ»ν•΄ ν¬κΈ°ν•˜λŠ” κ²½μš°κ°€ λ§Žλ‹€.
94
+ 17. λ°˜λ“œμ‹œ **각 λ¬Έμž₯μ—μ„œ 핡심 뢀뢄은 [[μ€‘μš” λ‚΄μš©]] ν˜•νƒœλ‘œ ν‘œμ‹œν•˜λΌ**
95
 
96
  제λͺ©: {title}
97
  μ„€λͺ…: {description}
 
164
  elif line.startswith('### '):
165
  line = f"<h3>{line[4:]}</h3>"
166
  else:
167
+ # 핡심 λΆ€λΆ„ ν•˜μ΄λΌμ΄νŠΈ 처리: [[μ€‘μš” λ‚΄μš©]]을 ν•˜μ΄λΌμ΄νŠΈλœ HTML둜 λ³€ν™˜
168
+ line = line.replace('[[', '<span style="background-color: #FFDAB9; font-weight: bold;">').replace(']]', '</span>')
169
  line = f"<p>{line}</p>"
170
  formatted_lines.append(line)
171
 
172
  formatted_summary = '\n'.join(formatted_lines)
173
 
174
  summary_content = f"""<div style="background-color: #e6f3ff; padding: 20px; border-radius: 10px; margin-top: 20px;">
175
+ <h3>μš”μ•½</h3>
176
+ <h2>{title}</h2>
177
+ {formatted_summary}
178
+ </div>"""
179
 
180
  # μ΅œμ’… κ²°κ³Ό ν‘œμ‹œ
181
  yield script_content, summary_content