Spaces:
Sleeping
Sleeping
sahandkh1419
commited on
Commit
•
26b478e
1
Parent(s):
87479c7
Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,50 @@ def cosine_sim(text1, text2):
|
|
7 |
vectorizer = TfidfVectorizer().fit_transform([text1, text2])
|
8 |
vectors = vectorizer.toarray()
|
9 |
return cosine_similarity(vectors)[0, 1]
|
10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
model = whisper.load_model("base")
|
12 |
st.audio("titanic.mp3")
|
13 |
st.write("Listen to music since you have to record 15seconds after that")
|
|
|
7 |
vectorizer = TfidfVectorizer().fit_transform([text1, text2])
|
8 |
vectors = vectorizer.toarray()
|
9 |
return cosine_similarity(vectors)[0, 1]
|
10 |
+
|
11 |
+
|
12 |
+
|
13 |
+
|
14 |
+
|
15 |
+
|
16 |
+
st.set_page_config(
|
17 |
+
page_title="Sing It Forward App",
|
18 |
+
page_icon="🎵")
|
19 |
+
|
20 |
+
st.markdown(
|
21 |
+
"""
|
22 |
+
<style>
|
23 |
+
.main {
|
24 |
+
background: linear-gradient(to bottom, #0E5AAB, #00ffff);
|
25 |
+
padding: 20px;
|
26 |
+
border-radius: 10px;
|
27 |
+
}
|
28 |
+
</style>
|
29 |
+
""",
|
30 |
+
unsafe_allow_html=True
|
31 |
+
)
|
32 |
+
|
33 |
+
st.markdown("<h1 style='text-align: center; margin-bottom: 5px;'>Sing It Forward App🎵</h1>", unsafe_allow_html=True)
|
34 |
+
|
35 |
+
description = """
|
36 |
+
<h5>Welcome to Sing It Forward App!</h5>
|
37 |
+
<p style="text-align: justify;">
|
38 |
+
Get ready to test your singing skills and memory! First, listen carefully to the first part of the song, then it’s your turn to shine.
|
39 |
+
Record yourself singing the next 15 seconds on your own, matching the lyrics and rhythm perfectly. Think you’ve got what it takes to keep the music going?
|
40 |
+
Let’s see if you can hit the right notes and showcase your talent! Unleash your inner star and take the challenge!
|
41 |
+
</p>
|
42 |
+
📌For any questions or contact:
|
43 |
+
**Name:** <span style="color: black;">Sahand Khorsandi</span>
|
44 |
+
**Email:** <a href="mailto:sahand.kh78@yahoo.com" style="color: black;">sahand.kh78@yahoo.com</a>"""
|
45 |
+
st.markdown(description, unsafe_allow_html=True)
|
46 |
+
st.write('------')
|
47 |
+
|
48 |
+
|
49 |
+
|
50 |
+
|
51 |
+
|
52 |
+
|
53 |
+
|
54 |
model = whisper.load_model("base")
|
55 |
st.audio("titanic.mp3")
|
56 |
st.write("Listen to music since you have to record 15seconds after that")
|