RexChan commited on
Commit
ec9ef72
·
verified ·
1 Parent(s): efed6b6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -0
app.py CHANGED
@@ -73,9 +73,17 @@ def main():
73
  st.write("File uploaded successfully!")
74
  else:
75
  st.write("No file uploaded.")
 
 
76
  audio_preprocess()
77
  transcription = asr_model()
78
  final_result = senti_model(transcription)
 
 
 
 
 
 
79
 
80
 
81
  if __name__ == '__main__':
 
73
  st.write("File uploaded successfully!")
74
  else:
75
  st.write("No file uploaded.")
76
+ st.set_page_config(page_title="Sentiment Analysis on Your Cantonese Song",)
77
+ st.header("Cantonese Song Sentiment Analyzer")
78
  audio_preprocess()
79
  transcription = asr_model()
80
  final_result = senti_model(transcription)
81
+
82
+ if st.button("Play Audio"):
83
+ st.audio(audio_data['audio'],
84
+ format="audio/wav",
85
+ start_time=0,
86
+ sample_rate = audio_data['sampling_rate'])
87
 
88
 
89
  if __name__ == '__main__':