Zw07 commited on
Commit
04dd2d0
โ€ข
1 Parent(s): 0153e63

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -8,6 +8,7 @@ import numpy as np
8
  import soundfile
9
  from wavmark.utils import file_reader
10
 
 
11
  # pipeline = pipeline(task="image-classification", model="julien-c/hotdog-not-hotdog")
12
 
13
  # st.title("Hot Dog? Or Not?")
@@ -65,10 +66,10 @@ def main():
65
  if action == "Add Watermark":
66
  watermark_text = st.text_input("The watermark (0, 1 list of length-16):", value=st.session_state.def_value)
67
  add_watermark_button = st.button("Add Watermark", key="add_watermark_btn")
68
- # if add_watermark_button: # ็‚นๅ‡ปๆŒ‰้’ฎๅŽๆ‰ง่กŒ็š„
69
- # if audio_file and watermark_text:
70
- # with st.spinner("Adding Watermark..."):
71
- # watermarked_audio, encode_time_cost = add_watermark(tmp_input_audio_file, watermark_text)
72
  # st.write("Watermarked Audio:")
73
  # print("watermarked_audio:", watermarked_audio)
74
  # st.audio(watermarked_audio, format="audio/wav")
 
8
  import soundfile
9
  from wavmark.utils import file_reader
10
 
11
+
12
  # pipeline = pipeline(task="image-classification", model="julien-c/hotdog-not-hotdog")
13
 
14
  # st.title("Hot Dog? Or Not?")
 
66
  if action == "Add Watermark":
67
  watermark_text = st.text_input("The watermark (0, 1 list of length-16):", value=st.session_state.def_value)
68
  add_watermark_button = st.button("Add Watermark", key="add_watermark_btn")
69
+ if add_watermark_button: # ็‚นๅ‡ปๆŒ‰้’ฎๅŽๆ‰ง่กŒ็š„
70
+ if audio_file and watermark_text:
71
+ with st.spinner("Adding Watermark..."):
72
+ # watermarked_audio, encode_time_cost = add_watermark(tmp_input_audio_file, watermark_text)
73
  # st.write("Watermarked Audio:")
74
  # print("watermarked_audio:", watermarked_audio)
75
  # st.audio(watermarked_audio, format="audio/wav")