sahandkh1419 commited on
Commit
64d1371
1 Parent(s): 0a48439

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -28
app.py CHANGED
@@ -2,6 +2,7 @@ import streamlit as st
2
  import whisper
3
  from sklearn.feature_extraction.text import TfidfVectorizer
4
  from sklearn.metrics.pairwise import cosine_similarity
 
5
 
6
  st.set_page_config(
7
  page_title="Sing It Forward App",
@@ -16,31 +17,13 @@ st.markdown(
16
  border-radius: 10px;
17
  }
18
  a {
19
- color: black !important
20
  }
21
  </style>
22
  """,
23
  unsafe_allow_html=True
24
  )
25
 
26
-
27
- # background_image_url = "https://static.vecteezy.com/system/resources/previews/020/333/164/non_2x/stephen-foster-memorial-day-illustration-with-copy-space-area-and-blue-background-suitable-to-use-on-memorial-day-event-vector.jpg"
28
- # st.markdown(
29
- # f"""
30
- # <style>
31
- # .stApp {{
32
- # background-image: url("{background_image_url}");
33
- # background-size: cover;
34
- # background-position: center;
35
- # background-repeat: no-repeat;
36
- # }}
37
- # </style>
38
- # """,
39
- # unsafe_allow_html=True
40
- # )
41
-
42
- import base64
43
-
44
  def load_image(image_file):
45
  with open(image_file, "rb") as f:
46
  return f.read()
@@ -48,7 +31,6 @@ def load_image(image_file):
48
  image_data = load_image("bcg.jpg")
49
  image_base64 = base64.b64encode(image_data).decode()
50
 
51
-
52
  st.markdown(
53
  f"""
54
  <style>
@@ -63,12 +45,6 @@ st.markdown(
63
  unsafe_allow_html=True
64
  )
65
 
66
-
67
-
68
-
69
-
70
-
71
-
72
  st.markdown("<h1 style='text-align: center; margin-bottom: 5px;'>Sing It Forward App🎵</h1>", unsafe_allow_html=True)
73
 
74
  description = """
@@ -81,8 +57,8 @@ Let’s see if you can hit the right notes and showcase your talent! Unleash you
81
  </p>
82
 
83
  📌For any questions or contact:
84
- **Name:** <span style="color: black;">Sahand Khorsandi</span>
85
- **Email:** <a href="mailto:[email protected]" style="color: black;">[email protected]</a>"""
86
  st.markdown(description, unsafe_allow_html=True)
87
  st.write('------')
88
 
@@ -90,6 +66,8 @@ st.write('------')
90
 
91
 
92
 
 
 
93
  def cosine_sim(text1, text2):
94
  vectorizer = TfidfVectorizer().fit_transform([text1, text2])
95
  vectors = vectorizer.toarray()
 
2
  import whisper
3
  from sklearn.feature_extraction.text import TfidfVectorizer
4
  from sklearn.metrics.pairwise import cosine_similarity
5
+ import base64
6
 
7
  st.set_page_config(
8
  page_title="Sing It Forward App",
 
17
  border-radius: 10px;
18
  }
19
  a {
20
+ color: #EDA67C !important
21
  }
22
  </style>
23
  """,
24
  unsafe_allow_html=True
25
  )
26
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  def load_image(image_file):
28
  with open(image_file, "rb") as f:
29
  return f.read()
 
31
  image_data = load_image("bcg.jpg")
32
  image_base64 = base64.b64encode(image_data).decode()
33
 
 
34
  st.markdown(
35
  f"""
36
  <style>
 
45
  unsafe_allow_html=True
46
  )
47
 
 
 
 
 
 
 
48
  st.markdown("<h1 style='text-align: center; margin-bottom: 5px;'>Sing It Forward App🎵</h1>", unsafe_allow_html=True)
49
 
50
  description = """
 
57
  </p>
58
 
59
  📌For any questions or contact:
60
+ **Name:** <span style="color: #EDA67C;">Sahand Khorsandi</span>
61
+ **Email:** <a href="mailto:[email protected]" style="color: #EDA67C;">[email protected]</a>"""
62
  st.markdown(description, unsafe_allow_html=True)
63
  st.write('------')
64
 
 
66
 
67
 
68
 
69
+
70
+
71
  def cosine_sim(text1, text2):
72
  vectorizer = TfidfVectorizer().fit_transform([text1, text2])
73
  vectors = vectorizer.toarray()