Loading features/min_max_stats_finder.py +4 −2 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ import matplotlib.pyplot as plt from loguru import logger OUTPUT_FILE = "variables.nani" OUTPUT_FILE = "variables.txt" def min_max_scores(content): logger.info("Computing scores for all scenes. It may take a bit of time...") Loading Loading @@ -106,7 +106,9 @@ def write_vars_to_file(scores): with open(OUTPUT_FILE, 'w', encoding='utf-8') as f: for key in scores: for emotion in scores[key]: f.write("@set "+normalize_string(key.upper())+"_"+normalize_string(emotion.upper())+"="+str(scores[key][emotion])+"\n") #f.write("@set "+normalize_string(key.upper())+"_"+normalize_string(emotion.upper())+"="+str(scores[key][emotion])+"\n") f.write(" - name: "+normalize_string(key.upper())+"_"+normalize_string(emotion.upper())+"\n") f.write(" value: "+str(scores[key][emotion])+"\n") f.write("@stop") if __name__ == "__main__": Loading Loading
features/min_max_stats_finder.py +4 −2 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ import matplotlib.pyplot as plt from loguru import logger OUTPUT_FILE = "variables.nani" OUTPUT_FILE = "variables.txt" def min_max_scores(content): logger.info("Computing scores for all scenes. It may take a bit of time...") Loading Loading @@ -106,7 +106,9 @@ def write_vars_to_file(scores): with open(OUTPUT_FILE, 'w', encoding='utf-8') as f: for key in scores: for emotion in scores[key]: f.write("@set "+normalize_string(key.upper())+"_"+normalize_string(emotion.upper())+"="+str(scores[key][emotion])+"\n") #f.write("@set "+normalize_string(key.upper())+"_"+normalize_string(emotion.upper())+"="+str(scores[key][emotion])+"\n") f.write(" - name: "+normalize_string(key.upper())+"_"+normalize_string(emotion.upper())+"\n") f.write(" value: "+str(scores[key][emotion])+"\n") f.write("@stop") if __name__ == "__main__": Loading