Spaces:
Sleeping
Sleeping
Creating app.py
Browse files
app.py
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
#from StreamlitBrute import TextGeneration # Import the function from your model script
|
3 |
+
from StreamlitModel import TextGeneration
|
4 |
+
|
5 |
+
def main():
|
6 |
+
st.title("Lyrics Generation")
|
7 |
+
st.text("Enter your prompt here to generate lyrics for your new hit song!")
|
8 |
+
st.text("This is a work in progress, and I will update it as needed")
|
9 |
+
st.text("Please allow a minute for the text to generate")
|
10 |
+
st.text("You can refer to the github repository in the link below for more info")
|
11 |
+
st.write("[Repository](https://github.com/Selbl/LyricGeneration)")
|
12 |
+
# User input for prompt
|
13 |
+
prompt = st.text_area("Enter your prompt here:")
|
14 |
+
|
15 |
+
# Button to generate text
|
16 |
+
if st.button("Generate Text"):
|
17 |
+
if prompt:
|
18 |
+
# Call your function to generate text
|
19 |
+
generated_text = TextGeneration(prompt)
|
20 |
+
st.subheader("Generated Text:")
|
21 |
+
st.write(generated_text)
|
22 |
+
else:
|
23 |
+
st.warning("Please enter a prompt.")
|
24 |
+
|
25 |
+
if __name__ == "__main__":
|
26 |
+
main()
|