ginipick commited on
Commit
e5c3484
Β·
verified Β·
1 Parent(s): d2f6bd6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -8,7 +8,6 @@ import threading
8
  from googleapiclient.discovery import build
9
  from huggingface_hub import InferenceClient
10
  from pytube import YouTube
11
- import subprocess
12
  import whisper
13
  import logging
14
 
@@ -138,7 +137,7 @@ def fetch_comments(video_url, system_prompt):
138
  existing_comments = load_existing_comments()
139
  new_comments = get_video_comments(video_id)
140
 
141
- if not new_comments or 'error' in new_comments[0]]:
142
  return "λŒ“κΈ€μ„ 찾을 수 μ—†κ±°λ‚˜ 였λ₯˜κ°€ λ°œμƒν–ˆμŠ΅λ‹ˆλ‹€."
143
 
144
  recent_new_comments = [c for c in new_comments if c['comment_id'] not in {c['comment_id'] for c in existing_comments} and c['reply_count'] == 0]
 
8
  from googleapiclient.discovery import build
9
  from huggingface_hub import InferenceClient
10
  from pytube import YouTube
 
11
  import whisper
12
  import logging
13
 
 
137
  existing_comments = load_existing_comments()
138
  new_comments = get_video_comments(video_id)
139
 
140
+ if not new_comments or 'error' in new_comments[0]:
141
  return "λŒ“κΈ€μ„ 찾을 수 μ—†κ±°λ‚˜ 였λ₯˜κ°€ λ°œμƒν–ˆμŠ΅λ‹ˆλ‹€."
142
 
143
  recent_new_comments = [c for c in new_comments if c['comment_id'] not in {c['comment_id'] for c in existing_comments} and c['reply_count'] == 0]