Skip to content

Commit

Permalink
Generalize test
Browse files Browse the repository at this point in the history
  • Loading branch information
cmaloney111 authored Apr 6, 2024
1 parent ed8e18e commit 353ca42
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions api/models_code/test.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Emotions_found = {}
with open(r'C:\Users\camer\Downloads\output (1).csv', 'r') as f:
CSV_PATH = r'C:\Users\camer\Downloads\output (1).csv'
with open(CSV_PATH, 'r') as f:
next(f)
for line in f:
if line[line.rfind(',')+1:-1] == '':
Expand All @@ -11,4 +12,4 @@
Emotions_found[line[line.rfind(',')+1:-1]] += 1

for emotion, times in Emotions_found.items():
print(f'{emotion}: {times}')
print(f'{emotion}: {times}')

0 comments on commit 353ca42

Please sign in to comment.