Spaces:
Build error
Build error
Hong
commited on
Commit
•
e851e40
1
Parent(s):
013ad38
Upload app.py
Browse files
app.py
CHANGED
@@ -14,12 +14,15 @@ from utils import (
|
|
14 |
from ast import literal_eval
|
15 |
from stqdm import stqdm
|
16 |
|
17 |
-
with open("joblists.txt") as file:
|
18 |
lines = file.readlines()
|
19 |
jobs = [line.rstrip() for line in lines]
|
20 |
|
21 |
-
DB = pd.read_csv("JDs_final.csv").dropna()
|
22 |
-
|
|
|
|
|
|
|
23 |
|
24 |
|
25 |
def get_recommendation(DB, data, jobname, by="course_info"):
|
@@ -38,13 +41,12 @@ def get_recommendation(DB, data, jobname, by="course_info"):
|
|
38 |
|
39 |
|
40 |
st.title("Course Recommender🤔")
|
41 |
-
|
42 |
if device == "cpu":
|
43 |
processor = "🖥️"
|
44 |
else:
|
45 |
processor = "💽"
|
46 |
|
47 |
-
st.
|
48 |
|
49 |
option = st.checkbox("💻From referece IT jobs?")
|
50 |
if option:
|
|
|
14 |
from ast import literal_eval
|
15 |
from stqdm import stqdm
|
16 |
|
17 |
+
with open("data/joblists.txt") as file:
|
18 |
lines = file.readlines()
|
19 |
jobs = [line.rstrip() for line in lines]
|
20 |
|
21 |
+
DB = pd.read_csv("data/JDs_final.csv").dropna()
|
22 |
+
DB.details = DB.details.apply(lambda x: literal_eval(x))
|
23 |
+
DB.tokenized = DB.tokenized.apply(lambda x: literal_eval(x))
|
24 |
+
DB = DB.drop_duplicates(["description"])
|
25 |
+
data = pd.read_csv("data/processed_courses_data.csv")
|
26 |
|
27 |
|
28 |
def get_recommendation(DB, data, jobname, by="course_info"):
|
|
|
41 |
|
42 |
|
43 |
st.title("Course Recommender🤔")
|
|
|
44 |
if device == "cpu":
|
45 |
processor = "🖥️"
|
46 |
else:
|
47 |
processor = "💽"
|
48 |
|
49 |
+
st.subheader("Running on {}".format(device + processor))
|
50 |
|
51 |
option = st.checkbox("💻From referece IT jobs?")
|
52 |
if option:
|