Update app.py
Browse files
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]
|