shubham142000 commited on
Commit
46d835c
1 Parent(s): 2a5d1f7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -16
app.py CHANGED
@@ -1,23 +1,10 @@
1
  import streamlit as st
2
  import pandas as pd
3
- from sklearn.feature_extraction.text import TfidfVectorizer
4
- from sklearn.metrics.pairwise import cosine_similarity
5
- from sklearn.neighbors import NearestNeighbors
6
-
7
  # Function to recommend papers
8
  def recommend_papers(positive_df, unlabelled_df, model="tfidf"):
9
- if model == "tfidf":
10
- # Use TF-IDF Vectorizer
11
- vectorizer = TfidfVectorizer(stop_words='english')
12
- positive_matrix = vectorizer.fit_transform(positive_df['abstract'])
13
- unlabelled_matrix = vectorizer.transform(unlabelled_df['abstract'])
14
- elif model == "nn":
15
- # Use Nearest Neighbors
16
- nn_model = NearestNeighbors(n_neighbors=5, algorithm='auto')
17
- nn_model.fit(positive_df['abstract'])
18
- distances, indices = nn_model.kneighbors(unlabelled_df['abstract'])
19
- return indices
20
-
21
  # Streamlit app
22
  def main():
23
  st.title("ArXiv Feed Recommendations")
 
1
  import streamlit as st
2
  import pandas as pd
3
+ f
 
 
 
4
  # Function to recommend papers
5
  def recommend_papers(positive_df, unlabelled_df, model="tfidf"):
6
+ pass
7
+
 
 
 
 
 
 
 
 
 
 
8
  # Streamlit app
9
  def main():
10
  st.title("ArXiv Feed Recommendations")