Commit a1f435d9 authored by Studer Brendan's avatar Studer Brendan
Browse files

pour henry

parent 18a89aa5
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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...")
@@ -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__":