Update app.py
Browse files
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 |
-
|
69 |
-
|
70 |
-
|
71 |
-
#
|
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")
|