Update app.py
Browse files
app.py
CHANGED
|
@@ -37,11 +37,11 @@ def main():
|
|
| 37 |
title = st.text_input('Write a prompt (จะใช้เวลาค่อนข้างมากในการสร้างเนื่องจากใช้ CPU ในการรันโมเดล)', "")
|
| 38 |
|
| 39 |
if st.button('Generate Image'):
|
| 40 |
-
# Call the
|
| 41 |
-
generated_music = mu_gen(prompt
|
| 42 |
|
| 43 |
-
# Display the generated
|
| 44 |
-
st.
|
| 45 |
|
| 46 |
if __name__ == '__main__':
|
| 47 |
-
main()
|
|
|
|
| 37 |
title = st.text_input('Write a prompt (จะใช้เวลาค่อนข้างมากในการสร้างเนื่องจากใช้ CPU ในการรันโมเดล)', "")
|
| 38 |
|
| 39 |
if st.button('Generate Image'):
|
| 40 |
+
# Call the mu_gen function to generate music using the 'title' prompt
|
| 41 |
+
generated_music = mu_gen(title) # Replace 'prompt' with 'title'
|
| 42 |
|
| 43 |
+
# Display the generated audio
|
| 44 |
+
st.audio(generated_music, format='audio/mpeg', start_time=0)
|
| 45 |
|
| 46 |
if __name__ == '__main__':
|
| 47 |
+
main()
|