Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -17,11 +17,12 @@ def generate_music_tensors(descriptions, duration: int):
|
|
17 |
model = load_model()
|
18 |
|
19 |
model.set_generation_params(
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
)
|
24 |
|
|
|
25 |
with st.spinner("Generating Music..."):
|
26 |
output = model.generate(
|
27 |
descriptions=descriptions,
|
@@ -71,7 +72,13 @@ def main():
|
|
71 |
selected_genre = st.selectbox("Select Genre", genres)
|
72 |
|
73 |
st.subheader("2. Select time duration (In Seconds)")
|
74 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
|
76 |
st.title("""🎵 Song Lab AI 🎵""")
|
77 |
st.text('')
|
|
|
17 |
model = load_model()
|
18 |
|
19 |
model.set_generation_params(
|
20 |
+
use_sampling=True,
|
21 |
+
top_k=250,
|
22 |
+
duration=duration_seconds
|
23 |
)
|
24 |
|
25 |
+
|
26 |
with st.spinner("Generating Music..."):
|
27 |
output = model.generate(
|
28 |
descriptions=descriptions,
|
|
|
72 |
selected_genre = st.selectbox("Select Genre", genres)
|
73 |
|
74 |
st.subheader("2. Select time duration (In Seconds)")
|
75 |
+
# Adjust the time slider for selecting duration in minutes
|
76 |
+
time_slider = st.slider("Select time duration (In Minutes)", 1, 5, 1)
|
77 |
+
|
78 |
+
# Convert the selected minutes to seconds
|
79 |
+
duration_seconds = time_slider * 60
|
80 |
+
|
81 |
+
# time_slider = st.slider("Select time duration (In Seconds)", 0, 300, 10)
|
82 |
|
83 |
st.title("""🎵 Song Lab AI 🎵""")
|
84 |
st.text('')
|