Update app.py
Browse files
app.py
CHANGED
|
@@ -144,7 +144,7 @@ def main():
|
|
| 144 |
action = st.selectbox("Select Action", ["Add Watermark", "Decode Watermark"])
|
| 145 |
|
| 146 |
if action == "Add Watermark":
|
| 147 |
-
watermark_text = st.
|
| 148 |
add_watermark_button = st.button("Add Watermark", key="add_watermark_btn")
|
| 149 |
if add_watermark_button: # 点击按钮后执行的
|
| 150 |
if audio_file and watermark_text:
|
|
@@ -168,7 +168,7 @@ def main():
|
|
| 168 |
# watermarked_audio = torchaudio.save("output.wav", squeeze, default_sr)
|
| 169 |
|
| 170 |
#2nd Attempt
|
| 171 |
-
watermarked_audio = model(wav, sample_rate=default_sr,
|
| 172 |
print(watermarked_audio.size())
|
| 173 |
size = watermarked_audio.size()
|
| 174 |
st.markdown(size)
|
|
|
|
| 144 |
action = st.selectbox("Select Action", ["Add Watermark", "Decode Watermark"])
|
| 145 |
|
| 146 |
if action == "Add Watermark":
|
| 147 |
+
watermark_text = st.text_input("The watermark (0, 1 list of length-16):", value=st.session_state.def_value)
|
| 148 |
add_watermark_button = st.button("Add Watermark", key="add_watermark_btn")
|
| 149 |
if add_watermark_button: # 点击按钮后执行的
|
| 150 |
if audio_file and watermark_text:
|
|
|
|
| 168 |
# watermarked_audio = torchaudio.save("output.wav", squeeze, default_sr)
|
| 169 |
|
| 170 |
#2nd Attempt
|
| 171 |
+
watermarked_audio = model(wav, sample_rate=default_sr, alpha=1)
|
| 172 |
print(watermarked_audio.size())
|
| 173 |
size = watermarked_audio.size()
|
| 174 |
st.markdown(size)
|