manika07 commited on
Commit
eda6550
·
1 Parent(s): cb480a0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -30,7 +30,6 @@ def get_ext(uploaded_file):
30
  return extype
31
 
32
 
33
-
34
  @st.cache_resource(ttl=3600)
35
  # def read_model(local_path):
36
  # with open(local_path, "rb") as f:
@@ -58,9 +57,9 @@ def read_tf(url):
58
  with open("temp.pkl", "rb") as f:
59
  preprocessing = pickle.load(f)
60
  return preprocessing
61
-
62
- svm_classifier = read_model("model2.pkl")
63
- preprocessing = read_tf("preprocessing.pkl")
64
 
65
  # Function to predict the category for a given abstract
66
  def predict_category(abstract):
@@ -83,7 +82,8 @@ def conv_txt(extype):
83
  papers.rename(columns=col_dict, inplace=True)
84
  return papers
85
 
86
-
 
87
  uploaded_file = st.file_uploader("Choose a file", type=['csv'])
88
  st.sidebar.header("Download Results")
89
  st.sidebar.text("Download the tagged results as a CSV file.")
 
30
  return extype
31
 
32
 
 
33
  @st.cache_resource(ttl=3600)
34
  # def read_model(local_path):
35
  # with open(local_path, "rb") as f:
 
57
  with open("temp.pkl", "rb") as f:
58
  preprocessing = pickle.load(f)
59
  return preprocessing
60
+
61
+ svm_classifier = read_model("https://github.com/manika-lamba/ml/raw/main/category/model2.pkl")
62
+ preprocessing = read_tf("https://github.com/manika-lamba/ml/raw/main/category/preprocessing.pkl")
63
 
64
  # Function to predict the category for a given abstract
65
  def predict_category(abstract):
 
82
  papers.rename(columns=col_dict, inplace=True)
83
  return papers
84
 
85
+ # Read Data
86
+
87
  uploaded_file = st.file_uploader("Choose a file", type=['csv'])
88
  st.sidebar.header("Download Results")
89
  st.sidebar.text("Download the tagged results as a CSV file.")