2022-12-27 01:25:19 -07:00
|
|
|
import streamlit as st
|
|
|
|
|
|
|
|
|
|
|
|
def render_main():
|
|
|
|
st.set_page_config(layout="wide", page_icon="🎸")
|
2023-01-04 21:43:44 -07:00
|
|
|
|
2023-01-05 18:55:01 -07:00
|
|
|
st.title(":guitar: Riffusion Playground")
|
2022-12-27 01:25:19 -07:00
|
|
|
|
|
|
|
left, right = st.columns(2)
|
|
|
|
|
|
|
|
with left:
|
2023-01-05 18:55:01 -07:00
|
|
|
create_link(":pencil2: Text to Audio", "/text_to_audio")
|
|
|
|
st.write("Generate audio clips from text prompts.")
|
|
|
|
|
|
|
|
create_link(":wave: Audio to Audio", "/audio_to_audio")
|
2023-01-14 14:59:36 -07:00
|
|
|
st.write("Upload audio and modify with text prompt (interpolation supported).")
|
2023-01-05 18:55:01 -07:00
|
|
|
|
2022-12-27 01:25:19 -07:00
|
|
|
create_link(":performing_arts: Interpolation", "/interpolation")
|
|
|
|
st.write("Interpolate between prompts in the latent space.")
|
|
|
|
|
2023-01-05 18:55:01 -07:00
|
|
|
create_link(":scissors: Audio Splitter", "/split_audio")
|
2023-01-14 14:59:36 -07:00
|
|
|
st.write("Split audio into stems like vocals, bass, drums, guitar, etc.")
|
2022-12-27 01:25:19 -07:00
|
|
|
|
2023-01-05 18:55:01 -07:00
|
|
|
with right:
|
2022-12-27 01:25:19 -07:00
|
|
|
create_link(":scroll: Text to Audio Batch", "/text_to_audio_batch")
|
|
|
|
st.write("Generate audio in batch from a JSON file of text prompts.")
|
|
|
|
|
2023-01-04 21:43:44 -07:00
|
|
|
create_link(":paperclip: Sample Clips", "/sample_clips")
|
2022-12-27 01:25:19 -07:00
|
|
|
st.write("Export short clips from an audio file.")
|
|
|
|
|
|
|
|
create_link(":musical_keyboard: Image to Audio", "/image_to_audio")
|
|
|
|
st.write("Reconstruct audio from spectrogram images.")
|
|
|
|
|
|
|
|
|
|
|
|
def create_link(name: str, url: str) -> None:
|
|
|
|
st.markdown(
|
|
|
|
f"### <a href='{url}' target='_self' style='text-decoration: none;'>{name}</a>",
|
|
|
|
unsafe_allow_html=True,
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
render_main()
|