Skip to content

Commit a45c7c9

Browse files
committed
Refactor code to improve readability and maintainability
1 parent d9de8de commit a45c7c9

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

summarizer.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ def main():
5757
llm_chain = setup_summarization_chain()
5858
result = llm_chain.run(docs)
5959

60-
print(result)
61-
6260

6361
if __name__ == "__main__":
6462
main()

yt_summarizer.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99

1010
def check_link(link):
11+
"""The function `check_link` uses a regular expression to check if a given link is a valid YouTube video link."""
1112
yt_regex = r"^(?:https?:\/\/)?(?:www\.)?youtu(?:be\.com\/watch\?v=|\.be\/)([\w\-\_]+)(?:\?.*)?$"
1213
return re.match(yt_regex, link) is not None
1314

0 commit comments

Comments
 (0)