import streamlit as st from StreamlitModel import TextGeneration def main(): # Set page configuration st.set_page_config( page_title="Lyrics Generation App", page_icon="🎤", layout="wide", initial_sidebar_state="auto", ) # Custom CSS for changing font and styling st.markdown( """ """, unsafe_allow_html=True, ) # App content st.title("Lyrics Generation") st.text("Enter a word or phrase here to generate lyrics for your new hit song!") st.text("This is a work in progress, and I will update it as needed") st.text("Please allow up to 10 minutes for the text to generate. The CPU is slow") st.text("You can refer to the GitHub repository in the link below for more info or if you want to run it locally (way faster)") st.write("[Repository](https://github.com/Selbl/LyricGeneration)") # User input for prompt prompt = st.text_area("Enter the first word or phrase of your new song here:") # Button to generate text if st.button("Generate Song"): if prompt: # Call your function to generate text generated_text = TextGeneration(prompt) st.subheader("Generated Song:") st.write(generated_text) else: st.warning("Please enter a word or phrase.") if __name__ == "__main__": main()