Spaces:
Runtime error
Runtime error
Update app_utils.py
Browse files- app_utils.py +2 -1
app_utils.py
CHANGED
@@ -416,6 +416,7 @@ def video_test(video):
|
|
416 |
s7=s7/frames_len
|
417 |
scores=[s1,s2,s3,s4,s5,s6,s7]
|
418 |
scores_str=str(scores)
|
|
|
419 |
with open("local_data/data.txt",'a', encoding="utf8") as f:
|
420 |
f.write(scores_str+'\n')
|
421 |
|
@@ -428,4 +429,4 @@ def video_test(video):
|
|
428 |
my_audio_clip = AudioFileClip(video)
|
429 |
my_audio_clip.write_audiofile("data/audio.wav",ffmpeg_params=["-ac","1"])
|
430 |
|
431 |
-
return stat,
|
|
|
416 |
s7=s7/frames_len
|
417 |
scores=[s1,s2,s3,s4,s5,s6,s7]
|
418 |
scores_str=str(scores)
|
419 |
+
score1=0*scores[0]-8*scores[1]+4*scores[2]+0*scores[3]+2*scores[4]+2*scores[5]+4*scores[6]
|
420 |
with open("local_data/data.txt",'a', encoding="utf8") as f:
|
421 |
f.write(scores_str+'\n')
|
422 |
|
|
|
429 |
my_audio_clip = AudioFileClip(video)
|
430 |
my_audio_clip.write_audiofile("data/audio.wav",ffmpeg_params=["-ac","1"])
|
431 |
|
432 |
+
return stat,score1,"data/audio.wav"
|