Spaces:
Runtime error
Runtime error
Commit
·
eea388c
1
Parent(s):
e95c13c
Update app.py
Browse files
app.py
CHANGED
@@ -56,35 +56,4 @@ n_candidates = st.slider("Number waveforms to generate", 1.0, 5.0, 3.0, step=1.0
|
|
56 |
random_seed = st.number_input("Seed", 1.0, 100.0, 45.0)
|
57 |
|
58 |
if st.button("Submit"):
|
59 |
-
text2audio(text, negative_prompt, duration, guidance_scale, random_seed, n_candidates)
|
60 |
-
|
61 |
-
st.markdown("### Output")
|
62 |
-
st.markdown("Share your generations with the community by clicking the share icon at the top right of the generated audio!")
|
63 |
-
|
64 |
-
st.markdown("Model by [Haohe Liu](https://twitter.com/LiuHaohe). Code and demo by 🤗 Hugging Face.")
|
65 |
-
|
66 |
-
st.markdown("### Examples")
|
67 |
-
examples = [
|
68 |
-
["A hammer is hitting a wooden surface.", "Low quality.", 10, 3.5, 45, 3],
|
69 |
-
["A cat is meowing for attention.", "Low quality.", 10, 3.5, 45, 3],
|
70 |
-
["An excited crowd cheering at a sports game.", "Low quality.", 10, 3.5, 45, 3],
|
71 |
-
["Birds singing sweetly in a blooming garden.", "Low quality.", 10, 3.5, 45, 3],
|
72 |
-
["A modern synthesizer creating futuristic soundscapes.", "Low quality.", 10, 3.5, 45, 3],
|
73 |
-
["The vibrant beat of Brazilian samba drums.", "Low quality.", 10, 3.5, 45, 3],
|
74 |
-
]
|
75 |
-
|
76 |
-
for example in examples:
|
77 |
-
st.markdown("---")
|
78 |
-
st.markdown(f"**Input**: {example[0]}")
|
79 |
-
st.markdown(f"**Negative Prompt**: {example[1]}")
|
80 |
-
st.markdown(f"**Duration**: {example[2]} seconds")
|
81 |
-
st.markdown(f"**Guidance Scale**: {example[3]}")
|
82 |
-
st.markdown(f"**Seed**: {example[4]}")
|
83 |
-
st.markdown(f"**Number Waveforms**: {example[5]}")
|
84 |
-
if st.button("Generate", key=f"example_{examples.index(example)}"):
|
85 |
-
text2audio(*example)
|
86 |
-
|
87 |
-
st.markdown("### Additional Information")
|
88 |
-
st.markdown(
|
89 |
-
"We build the model with data from [AudioSet](http://research.google.com/audioset/), [Freesound](https://freesound.org/), and [BBC Sound Effect library](https://sound-effects.bbcrewind.co.uk/). We share this demo based on the [UK copyright exception](https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/375954/Research.pdf) of data for academic research."
|
90 |
-
)
|
|
|
56 |
random_seed = st.number_input("Seed", 1.0, 100.0, 45.0)
|
57 |
|
58 |
if st.button("Submit"):
|
59 |
+
text2audio(text, negative_prompt, duration, guidance_scale, random_seed, n_candidates)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|