Skip to content

Commit 7f1f168

Browse files
committed
sentiment of all comments
1 parent 18d503c commit 7f1f168

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

condense/analystics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,4 +115,4 @@ def main(argv=None) -> int:
115115

116116

117117
if __name__ == "__main__":
118-
sys.exit(main())
118+
sys.exit(main())

condense/comments.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,16 +142,16 @@ def get_comments(apikey: str, file: bool, video_url: str) -> List[List[str]]:
142142
return Y.show_comments()
143143

144144

145-
def main(argv=None) -> str:
146-
# load_dotenv()
147-
apikey = "AIzaSyCkSWgMiJNS6N9EbtmiCEG6aPYOCYzCFuQ"
145+
def main(argv=None) -> int:
146+
load_dotenv()
147+
apikey = os.getenv("API_KEY")
148148

149149
parser = make_parser()
150150
args = parser.parse_args(argv)
151151

152152
comments = get_comments(str(apikey), args.csv, args.video_url)
153-
154153
return comments
154+
return 0
155155

156156

157157
if __name__ == "__main__":

condense/evaluation.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ def main(argv=None) -> str:
8787
neutral_count = 0
8888

8989
for comment in comments:
90-
print(comment)
9190
sentiment = predict_sentiment(model, tokenizer, comment[0])
9291
if sentiment == "positive":
9392
positive_count += 1
@@ -105,4 +104,4 @@ def main(argv=None) -> str:
105104

106105

107106
if __name__ == "__main__":
108-
sys.exit(main())
107+
sys.exit(main())

0 commit comments

Comments
 (0)