JobSelect 0.10.2__tar.gz → 0.10.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. {jobselect-0.10.2 → jobselect-0.10.4}/JobSelect.egg-info/PKG-INFO +1 -1
  2. {jobselect-0.10.2 → jobselect-0.10.4}/JobSelect.egg-info/SOURCES.txt +6 -0
  3. {jobselect-0.10.2 → jobselect-0.10.4}/PKG-INFO +1 -1
  4. jobselect-0.10.4/cli/jobselect.py +41 -0
  5. jobselect-0.10.4/cli/model_select.py +50 -0
  6. jobselect-0.10.4/cli/test_cli.py +41 -0
  7. jobselect-0.10.4/cli/utils.py +33 -0
  8. {jobselect-0.10.2 → jobselect-0.10.4}/pyproject.toml +1 -1
  9. jobselect-0.10.2/cli/jobselect.py +0 -114
  10. {jobselect-0.10.2 → jobselect-0.10.4}/JobSelect.egg-info/dependency_links.txt +0 -0
  11. {jobselect-0.10.2 → jobselect-0.10.4}/JobSelect.egg-info/entry_points.txt +0 -0
  12. {jobselect-0.10.2 → jobselect-0.10.4}/JobSelect.egg-info/requires.txt +0 -0
  13. {jobselect-0.10.2 → jobselect-0.10.4}/JobSelect.egg-info/top_level.txt +0 -0
  14. {jobselect-0.10.2 → jobselect-0.10.4}/LICENSE +0 -0
  15. {jobselect-0.10.2 → jobselect-0.10.4}/README.md +0 -0
  16. {jobselect-0.10.2 → jobselect-0.10.4}/model/Model.py +0 -0
  17. {jobselect-0.10.2 → jobselect-0.10.4}/model/__init__.py +0 -0
  18. {jobselect-0.10.2 → jobselect-0.10.4}/model/eval.py +0 -0
  19. {jobselect-0.10.2 → jobselect-0.10.4}/model/pred.py +0 -0
  20. {jobselect-0.10.2 → jobselect-0.10.4}/model/prep/__init__.py +0 -0
  21. {jobselect-0.10.2 → jobselect-0.10.4}/model/prep/data_prep.py +0 -0
  22. {jobselect-0.10.2 → jobselect-0.10.4}/model/prep/label_vocab.json +0 -0
  23. {jobselect-0.10.2 → jobselect-0.10.4}/model/prep/prepared_data.npz +0 -0
  24. {jobselect-0.10.2 → jobselect-0.10.4}/model/prep/sym_map.py +0 -0
  25. {jobselect-0.10.2 → jobselect-0.10.4}/model/prep/test.py +0 -0
  26. {jobselect-0.10.2 → jobselect-0.10.4}/model/prep/vectorizer.pkl +0 -0
  27. {jobselect-0.10.2 → jobselect-0.10.4}/model_out/skill_classifier.pt +0 -0
  28. {jobselect-0.10.2 → jobselect-0.10.4}/model_out/training_history.json +0 -0
  29. {jobselect-0.10.2 → jobselect-0.10.4}/setup.cfg +0 -0
  30. {jobselect-0.10.2 → jobselect-0.10.4}/test/test_model.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: JobSelect
3
- Version: 0.10.2
3
+ Version: 0.10.4
4
4
  Author-email: Akshay Babu <akshaysureshbabu100@gmail.com>
5
5
  Description-Content-Type: text/markdown
6
6
  License-File: LICENSE
@@ -2,6 +2,9 @@ LICENSE
2
2
  README.md
3
3
  pyproject.toml
4
4
  ./cli/jobselect.py
5
+ ./cli/model_select.py
6
+ ./cli/test_cli.py
7
+ ./cli/utils.py
5
8
  ./model/Model.py
6
9
  ./model/__init__.py
7
10
  ./model/eval.py
@@ -22,6 +25,9 @@ JobSelect.egg-info/entry_points.txt
22
25
  JobSelect.egg-info/requires.txt
23
26
  JobSelect.egg-info/top_level.txt
24
27
  cli/jobselect.py
28
+ cli/model_select.py
29
+ cli/test_cli.py
30
+ cli/utils.py
25
31
  model/Model.py
26
32
  model/__init__.py
27
33
  model/eval.py
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: JobSelect
3
- Version: 0.10.2
3
+ Version: 0.10.4
4
4
  Author-email: Akshay Babu <akshaysureshbabu100@gmail.com>
5
5
  Description-Content-Type: text/markdown
6
6
  License-File: LICENSE
@@ -0,0 +1,41 @@
1
+ from cli.utils import *
2
+ from rich import print
3
+ from cli.model_select import *
4
+
5
+ def cli() -> None:
6
+ clear_console()
7
+ title()
8
+
9
+ print("[yellow][JobAuto] ")
10
+ print("[yellow]>> Welcome to JobAuto!")
11
+
12
+ query("Enter Job Description")
13
+ jd = input(" >> ")
14
+
15
+ query("Enter Role (AI Engineer / AI Developer)")
16
+ role = input(" >> ")
17
+
18
+ query("Enter Type (Internship / Junior / Senior)")
19
+ job_type = input(" >> ")
20
+
21
+ results, mode = predict(jd, role=role, job_type=job_type)
22
+
23
+ clear_console()
24
+ title()
25
+
26
+ mode_colour = "green" if mode == "API" else "cyan"
27
+ print(f"\n [{mode_colour}][Mode: {mode}][/{mode_colour}]")
28
+
29
+ print("\n [yellow]Job Description Provided : \n", jd.strip())
30
+ print("\n [yellow]Job Role : \n", role)
31
+ print("\n [yellow]Type : \n", job_type)
32
+ print()
33
+
34
+ print("\n [yellow]TOP Skills \n")
35
+ for label, prob in results:
36
+ bar = "█" * int(prob * 30)
37
+ print(f" {label:25s} {prob:.2f} {bar}\n")
38
+
39
+
40
+ if __name__ == "__main__":
41
+ cli()
@@ -0,0 +1,50 @@
1
+ from pathlib import Path
2
+ from dotenv import load_dotenv
3
+ import os
4
+ import requests
5
+ import sys
6
+
7
+ PROJECT_ROOT = Path(__file__).resolve().parent.parent
8
+ if str(PROJECT_ROOT) not in sys.path:
9
+ sys.path.insert(0, str(PROJECT_ROOT))
10
+
11
+ _env_path = Path(__file__).resolve().parent / ".env"
12
+ if not _env_path.exists():
13
+ _env_path = PROJECT_ROOT / ".env"
14
+ load_dotenv(dotenv_path=_env_path)
15
+
16
+ API_URL = os.getenv("JOBAUTO_API_URL", "").rstrip("/")
17
+ API_KEY = os.getenv("JOBAUTO_API_KEY", "")
18
+
19
+ from model.pred import JobAnalyze_6k as _local_predict
20
+
21
+ def _call_api(jd: str, role: str, job_type: str) -> list[tuple[str, float]]:
22
+ endpoint = f"{API_URL}/JobAnalyze_6k"
23
+ headers = {"JobAnalyze_6k_Key": API_KEY}
24
+ payload = {"Job_Desc": jd, "Role": role, "Type": job_type}
25
+
26
+ response = requests.post(endpoint, json=payload, headers=headers, timeout=10)
27
+ response.raise_for_status()
28
+
29
+ data = response.json()
30
+
31
+ return [(skill, float(score)) for skill, score in data["answer"]]
32
+
33
+
34
+ def predict(jd: str, role: str, job_type: str) -> tuple[list[tuple[str, float]], str]:
35
+ if API_URL and API_KEY:
36
+ try:
37
+ results = _call_api(jd, role, job_type)
38
+ return results, "API"
39
+ except requests.exceptions.ConnectionError:
40
+ pass
41
+ except requests.exceptions.Timeout:
42
+ pass
43
+ except requests.exceptions.HTTPError as e:
44
+ if e.response is not None and e.response.status_code in (401, 403):
45
+ print(f"[red][JobAuto] API key issue ({e.response.status_code}) - running in LOCAL mode.[/red]")
46
+ except Exception:
47
+ pass
48
+
49
+ results = _local_predict(jd, role=role, job_type=job_type)
50
+ return results, "LOCAL"
@@ -0,0 +1,41 @@
1
+ from utils import *
2
+ from rich import print
3
+ from model_select import *
4
+
5
+ def cli() -> None:
6
+ clear_console()
7
+ title()
8
+
9
+ print("[yellow][JobAuto] ")
10
+ print("[yellow]>> Welcome to JobAuto!")
11
+
12
+ query("Enter Job Description")
13
+ jd = input(" >> ")
14
+
15
+ query("Enter Role (AI Engineer / AI Developer)")
16
+ role = input(" >> ")
17
+
18
+ query("Enter Type (Internship / Junior / Senior)")
19
+ job_type = input(" >> ")
20
+
21
+ results, mode = predict(jd, role=role, job_type=job_type)
22
+
23
+ clear_console()
24
+ title()
25
+
26
+ mode_colour = "green" if mode == "API" else "cyan"
27
+ print(f"\n [{mode_colour}][Mode: {mode}][/{mode_colour}]")
28
+
29
+ print("\n [yellow]Job Description Provided : \n", jd.strip())
30
+ print("\n [yellow]Job Role : \n", role)
31
+ print("\n [yellow]Type : \n", job_type)
32
+ print()
33
+
34
+ print("\n [yellow]TOP Skills \n")
35
+ for label, prob in results:
36
+ bar = "█" * int(prob * 30)
37
+ print(f" {label:25s} {prob:.2f} {bar}\n")
38
+
39
+
40
+ if __name__ == "__main__":
41
+ cli()
@@ -0,0 +1,33 @@
1
+ import os
2
+ import subprocess
3
+ from pyfiglet import Figlet
4
+ from rich import print
5
+
6
+ def clear_console() -> None:
7
+ if os.name == "nt":
8
+ subprocess.run("cls", shell=True)
9
+ else:
10
+ subprocess.run(["clear"])
11
+
12
+
13
+ def API_title() -> None:
14
+ f = Figlet(font="slant")
15
+ print("——————————————————————————————————————————————————————————————————————")
16
+ print(f.renderText("JobSelect CLI"))
17
+ print(" Copyright Akshay Babu, All rights reserved")
18
+ print("——————————————————————————————————————————————————————————————————————")
19
+
20
+
21
+ def title() -> None:
22
+ f = Figlet(font="slant")
23
+ print("——————————————————————————————————————————————————————————————————————")
24
+ print(f.renderText("JobSelect CLI"))
25
+ print("[blue] Running Model : JobAnalyze 6k v1.0")
26
+ print(" Copyright Akshay Babu, All rights reserved")
27
+ print("——————————————————————————————————————————————————————————————————————")
28
+
29
+
30
+ def query(message: str) -> None:
31
+ print("\n[yellow][JobAuto]")
32
+ print(f"[yellow] >> {message} : ")
33
+ print("[You]")
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "JobSelect"
3
- version = "0.10.2"
3
+ version = "0.10.4"
4
4
  authors = [
5
5
  { name="Akshay Babu", email="akshaysureshbabu100@gmail.com" },
6
6
  ]
@@ -1,114 +0,0 @@
1
- import os
2
- import subprocess
3
- import sys
4
- from pathlib import Path
5
- import requests
6
- from dotenv import load_dotenv
7
- from rich import print
8
- from pyfiglet import Figlet
9
-
10
- PROJECT_ROOT = Path(__file__).resolve().parent.parent
11
- if str(PROJECT_ROOT) not in sys.path:
12
- sys.path.insert(0, str(PROJECT_ROOT))
13
-
14
- _env_path = Path(__file__).resolve().parent / ".env"
15
- if not _env_path.exists():
16
- _env_path = PROJECT_ROOT / ".env"
17
- load_dotenv(dotenv_path=_env_path)
18
-
19
- API_URL = os.getenv("JOBAUTO_API_URL", "").rstrip("/")
20
- API_KEY = os.getenv("JOBAUTO_API_KEY", "")
21
-
22
- from model.pred import JobAnalyze_6k as _local_predict
23
-
24
- def _call_api(jd: str, role: str, job_type: str) -> list[tuple[str, float]]:
25
- endpoint = f"{API_URL}/JobAnalyze_6k"
26
- headers = {"JobAnalyze_6k_Key": API_KEY}
27
- payload = {"Job_Desc": jd, "Role": role, "Type": job_type}
28
-
29
- response = requests.post(endpoint, json=payload, headers=headers, timeout=10)
30
- response.raise_for_status()
31
-
32
- data = response.json()
33
-
34
- return [(skill, float(score)) for skill, score in data["answer"]]
35
-
36
-
37
- def predict(jd: str, role: str, job_type: str) -> tuple[list[tuple[str, float]], str]:
38
- if API_URL and API_KEY:
39
- try:
40
- results = _call_api(jd, role, job_type)
41
- return results, "API"
42
- except requests.exceptions.ConnectionError:
43
- pass
44
- except requests.exceptions.Timeout:
45
- pass
46
- except requests.exceptions.HTTPError as e:
47
- if e.response is not None and e.response.status_code in (401, 403):
48
- print(f"[red][JobAuto] API key issue ({e.response.status_code}) - running in LOCAL mode.[/red]")
49
- except Exception:
50
- pass
51
-
52
- results = _local_predict(jd, role=role, job_type=job_type)
53
- return results, "LOCAL"
54
-
55
-
56
- def clear_console() -> None:
57
- if os.name == "nt":
58
- subprocess.run("cls", shell=True)
59
- else:
60
- subprocess.run(["clear"])
61
-
62
-
63
- def title() -> None:
64
- f = Figlet(font="slant")
65
- print("——————————————————————————————————————————————————————————————————————")
66
- print(f.renderText("JobSelect CLI"))
67
- print("[blue] Running Model : JobAnalyze 6k v1.0")
68
- print("Copyright Akshay Babu, All rights reserved")
69
- print("——————————————————————————————————————————————————————————————————————")
70
-
71
-
72
- def query(message: str) -> None:
73
- print("\n[yellow][JobAuto]")
74
- print(f"[yellow] >> {message} : ")
75
- print("[You]")
76
-
77
-
78
- def cli() -> None:
79
- clear_console()
80
- title()
81
-
82
- print("[yellow][JobAuto] ")
83
- print("[yellow]>> Welcome to JobAuto!")
84
-
85
- query("Enter Job Description")
86
- jd = input(" >> ")
87
-
88
- query("Enter Role (AI Engineer / AI Developer)")
89
- role = input(" >> ")
90
-
91
- query("Enter Type (Internship / Junior / Senior)")
92
- job_type = input(" >> ")
93
-
94
- results, mode = predict(jd, role=role, job_type=job_type)
95
-
96
- clear_console()
97
- title()
98
-
99
- mode_colour = "green" if mode == "API" else "cyan"
100
- print(f"\n [{mode_colour}][Mode: {mode}][/{mode_colour}]")
101
-
102
- print("\n [yellow]Job Description Provided : \n", jd.strip())
103
- print("\n [yellow]Job Role : \n", role)
104
- print("\n [yellow]Type : \n", job_type)
105
- print()
106
-
107
- print("\n [yellow]TOP Skills \n")
108
- for label, prob in results:
109
- bar = "█" * int(prob * 30)
110
- print(f" {label:25s} {prob:.2f} {bar}\n")
111
-
112
-
113
- if __name__ == "__main__":
114
- cli()
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes