kkngan commited on
Commit
55cd7ba
·
verified ·
1 Parent(s): f597603

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -5
app.py CHANGED
@@ -28,6 +28,7 @@ def audio_preprocess(file_name = '/test1/vocals.wav'):
28
  # .export('cropped_vocals.wav', format='wav') # save vocal audio file
29
  return processed_audio
30
 
 
31
  # ASR transcription
32
  def asr_model(processed_audio):
33
  # load audio file
@@ -68,12 +69,13 @@ def senti_model(transcription):
68
 
69
 
70
  # main
71
- def main():
72
 
73
- # processed_audio = audio_preprocess(input_file)
74
- processed_audio = input_file
75
 
76
  transcription = asr_model(processed_audio)
 
77
  final_result = senti_model(transcription)
78
  st.write(final_result)
79
 
@@ -99,7 +101,7 @@ if __name__ == '__main__':
99
 
100
  # load song
101
  #input_file = os.path.isfile("test1.mp3")
102
- output_file = os.path.isdir("")
103
 
104
  if button_click:
105
- main()
 
28
  # .export('cropped_vocals.wav', format='wav') # save vocal audio file
29
  return processed_audio
30
 
31
+
32
  # ASR transcription
33
  def asr_model(processed_audio):
34
  # load audio file
 
69
 
70
 
71
  # main
72
+ def main(input_file):
73
 
74
+ processed_audio = audio_preprocess(input_file)
75
+ # processed_audio = input_file
76
 
77
  transcription = asr_model(processed_audio)
78
+ st.write(transcription)
79
  final_result = senti_model(transcription)
80
  st.write(final_result)
81
 
 
101
 
102
  # load song
103
  #input_file = os.path.isfile("test1.mp3")
104
+ # output_file = os.path.isdir("")
105
 
106
  if button_click:
107
+ main(input_file=input_file)