sahandkh1419 commited on
Commit
09fe96c
1 Parent(s): 0d4a81a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -11
app.py CHANGED
@@ -3,16 +3,6 @@ import whisper
3
  from sklearn.feature_extraction.text import TfidfVectorizer
4
  from sklearn.metrics.pairwise import cosine_similarity
5
 
6
- 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
-
12
-
13
-
14
-
15
-
16
  st.set_page_config(
17
  page_title="Sing It Forward App",
18
  page_icon="🎵")
@@ -51,7 +41,11 @@ st.write('------')
51
 
52
 
53
 
54
-
 
 
 
 
55
 
56
  model = whisper.load_model("base")
57
  st.audio("titanic.mp3")
 
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",
8
  page_icon="🎵")
 
41
 
42
 
43
 
44
+ def cosine_sim(text1, text2):
45
+ vectorizer = TfidfVectorizer().fit_transform([text1, text2])
46
+ vectors = vectorizer.toarray()
47
+ return cosine_similarity(vectors)[0, 1]
48
+
49
 
50
  model = whisper.load_model("base")
51
  st.audio("titanic.mp3")