Spaces:
Runtime error
Runtime error
Vincent Claes
commited on
Commit
·
d633195
1
Parent(s):
bc49c7c
add markdown
Browse files- Pipfile +1 -2
- Pipfile.lock +74 -39
- app.py +15 -15
Pipfile
CHANGED
@@ -4,10 +4,9 @@ verify_ssl = true
|
|
4 |
name = "pypi"
|
5 |
|
6 |
[packages]
|
7 |
-
gradio = "
|
8 |
requests = "*"
|
9 |
openai = "*"
|
10 |
-
uvicorn = "==0.23.0"
|
11 |
|
12 |
[dev-packages]
|
13 |
|
|
|
4 |
name = "pypi"
|
5 |
|
6 |
[packages]
|
7 |
+
gradio = "*"
|
8 |
requests = "*"
|
9 |
openai = "*"
|
|
|
10 |
|
11 |
[dev-packages]
|
12 |
|
Pipfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
{
|
2 |
"_meta": {
|
3 |
"hash": {
|
4 |
-
"sha256": "
|
5 |
},
|
6 |
"pipfile-spec": 6,
|
7 |
"requires": {
|
@@ -315,6 +315,14 @@
|
|
315 |
"markers": "python_version >= '3.6'",
|
316 |
"version": "==0.11.0"
|
317 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
318 |
"fastapi": {
|
319 |
"hashes": [
|
320 |
"sha256:271662daf986da8fa98dc2b7c7f61c4abdfdccfb4786d79ed8b2878f172c6d5f",
|
@@ -454,19 +462,19 @@
|
|
454 |
},
|
455 |
"gradio": {
|
456 |
"hashes": [
|
457 |
-
"sha256:
|
458 |
-
"sha256:
|
459 |
],
|
460 |
"index": "pypi",
|
461 |
-
"version": "==3.
|
462 |
},
|
463 |
"gradio-client": {
|
464 |
"hashes": [
|
465 |
-
"sha256:
|
466 |
-
"sha256:
|
467 |
],
|
468 |
-
"markers": "python_version >= '3.
|
469 |
-
"version": "==0.
|
470 |
},
|
471 |
"h11": {
|
472 |
"hashes": [
|
@@ -508,6 +516,14 @@
|
|
508 |
"markers": "python_version >= '3.5'",
|
509 |
"version": "==3.4"
|
510 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
511 |
"jinja2": {
|
512 |
"hashes": [
|
513 |
"sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852",
|
@@ -825,34 +841,37 @@
|
|
825 |
},
|
826 |
"numpy": {
|
827 |
"hashes": [
|
828 |
-
"sha256:
|
829 |
-
"sha256:
|
830 |
-
"sha256:
|
831 |
-
"sha256:
|
832 |
-
"sha256:
|
833 |
-
"sha256:
|
834 |
-
"sha256:
|
835 |
-
"sha256:
|
836 |
-
"sha256:
|
837 |
-
"sha256:
|
838 |
-
"sha256:
|
839 |
-
"sha256:
|
840 |
-
"sha256:
|
841 |
-
"sha256:
|
842 |
-
"sha256:
|
843 |
-
"sha256:
|
844 |
-
"sha256:
|
845 |
-
"sha256:
|
846 |
-
"sha256:
|
847 |
-
"sha256:
|
848 |
-
"sha256:
|
849 |
-
"sha256:
|
850 |
-
"sha256:
|
851 |
-
"sha256:
|
852 |
-
"sha256:
|
853 |
-
|
854 |
-
|
855 |
-
|
|
|
|
|
|
|
856 |
},
|
857 |
"openai": {
|
858 |
"hashes": [
|
@@ -1015,6 +1034,14 @@
|
|
1015 |
"markers": "python_version >= '3.8'",
|
1016 |
"version": "==10.0.0"
|
1017 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1018 |
"pydantic": {
|
1019 |
"hashes": [
|
1020 |
"sha256:614eb3321eb600c81899a88fa9858b008e3c79e0d4f1b49ab1f516b4b0c27cfb",
|
@@ -1423,12 +1450,12 @@
|
|
1423 |
},
|
1424 |
"uvicorn": {
|
1425 |
"hashes": [
|
1426 |
-
"sha256:
|
1427 |
-
"sha256:
|
1428 |
],
|
1429 |
"index": "pypi",
|
1430 |
"markers": "python_version >= '3.8'",
|
1431 |
-
"version": "==0.23.
|
1432 |
},
|
1433 |
"websockets": {
|
1434 |
"hashes": [
|
@@ -1585,6 +1612,14 @@
|
|
1585 |
],
|
1586 |
"markers": "python_version >= '3.7'",
|
1587 |
"version": "==1.9.2"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1588 |
}
|
1589 |
},
|
1590 |
"develop": {}
|
|
|
1 |
{
|
2 |
"_meta": {
|
3 |
"hash": {
|
4 |
+
"sha256": "8ff371c26b9bee1dda4b5c5e96e203920b9dc7ac0de76ef79a7d1e1dc24558ad"
|
5 |
},
|
6 |
"pipfile-spec": 6,
|
7 |
"requires": {
|
|
|
315 |
"markers": "python_version >= '3.6'",
|
316 |
"version": "==0.11.0"
|
317 |
},
|
318 |
+
"exceptiongroup": {
|
319 |
+
"hashes": [
|
320 |
+
"sha256:12c3e887d6485d16943a309616de20ae5582633e0a2eda17f4e10fd61c1e8af5",
|
321 |
+
"sha256:e346e69d186172ca7cf029c8c1d16235aa0e04035e5750b4b95039e65204328f"
|
322 |
+
],
|
323 |
+
"markers": "python_version < '3.11'",
|
324 |
+
"version": "==1.1.2"
|
325 |
+
},
|
326 |
"fastapi": {
|
327 |
"hashes": [
|
328 |
"sha256:271662daf986da8fa98dc2b7c7f61c4abdfdccfb4786d79ed8b2878f172c6d5f",
|
|
|
462 |
},
|
463 |
"gradio": {
|
464 |
"hashes": [
|
465 |
+
"sha256:183440d6ca8b8a08f38ec660c2499173771986d76562dafb23c0508680e7c3d0",
|
466 |
+
"sha256:62fd9ea44be20bd94c8e58c3ba7bedaa8c74f8e2048390aaa3eb0e3af4556479"
|
467 |
],
|
468 |
"index": "pypi",
|
469 |
+
"version": "==3.37.0"
|
470 |
},
|
471 |
"gradio-client": {
|
472 |
"hashes": [
|
473 |
+
"sha256:8b1e32093f766812b91c65756e85ad8bbe6d60b885b87b47908a72359c8d72a0",
|
474 |
+
"sha256:d4f93c86649f7662ec16861506ae864d18667422e8c8ecc227360f2aedcffdc9"
|
475 |
],
|
476 |
+
"markers": "python_version >= '3.8'",
|
477 |
+
"version": "==0.2.10"
|
478 |
},
|
479 |
"h11": {
|
480 |
"hashes": [
|
|
|
516 |
"markers": "python_version >= '3.5'",
|
517 |
"version": "==3.4"
|
518 |
},
|
519 |
+
"importlib-resources": {
|
520 |
+
"hashes": [
|
521 |
+
"sha256:4cf94875a8368bd89531a756df9a9ebe1f150e0f885030b461237bc7f2d905f2",
|
522 |
+
"sha256:d952faee11004c045f785bb5636e8f885bed30dc3c940d5d42798a2a4541c185"
|
523 |
+
],
|
524 |
+
"markers": "python_version < '3.10'",
|
525 |
+
"version": "==6.0.0"
|
526 |
+
},
|
527 |
"jinja2": {
|
528 |
"hashes": [
|
529 |
"sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852",
|
|
|
841 |
},
|
842 |
"numpy": {
|
843 |
"hashes": [
|
844 |
+
"sha256:04640dab83f7c6c85abf9cd729c5b65f1ebd0ccf9de90b270cd61935eef0197f",
|
845 |
+
"sha256:1452241c290f3e2a312c137a9999cdbf63f78864d63c79039bda65ee86943f61",
|
846 |
+
"sha256:222e40d0e2548690405b0b3c7b21d1169117391c2e82c378467ef9ab4c8f0da7",
|
847 |
+
"sha256:2541312fbf09977f3b3ad449c4e5f4bb55d0dbf79226d7724211acc905049400",
|
848 |
+
"sha256:31f13e25b4e304632a4619d0e0777662c2ffea99fcae2029556b17d8ff958aef",
|
849 |
+
"sha256:4602244f345453db537be5314d3983dbf5834a9701b7723ec28923e2889e0bb2",
|
850 |
+
"sha256:4979217d7de511a8d57f4b4b5b2b965f707768440c17cb70fbf254c4b225238d",
|
851 |
+
"sha256:4c21decb6ea94057331e111a5bed9a79d335658c27ce2adb580fb4d54f2ad9bc",
|
852 |
+
"sha256:6620c0acd41dbcb368610bb2f4d83145674040025e5536954782467100aa8835",
|
853 |
+
"sha256:692f2e0f55794943c5bfff12b3f56f99af76f902fc47487bdfe97856de51a706",
|
854 |
+
"sha256:7215847ce88a85ce39baf9e89070cb860c98fdddacbaa6c0da3ffb31b3350bd5",
|
855 |
+
"sha256:79fc682a374c4a8ed08b331bef9c5f582585d1048fa6d80bc6c35bc384eee9b4",
|
856 |
+
"sha256:7ffe43c74893dbf38c2b0a1f5428760a1a9c98285553c89e12d70a96a7f3a4d6",
|
857 |
+
"sha256:80f5e3a4e498641401868df4208b74581206afbee7cf7b8329daae82676d9463",
|
858 |
+
"sha256:95f7ac6540e95bc440ad77f56e520da5bf877f87dca58bd095288dce8940532a",
|
859 |
+
"sha256:9667575fb6d13c95f1b36aca12c5ee3356bf001b714fc354eb5465ce1609e62f",
|
860 |
+
"sha256:a5425b114831d1e77e4b5d812b69d11d962e104095a5b9c3b641a218abcc050e",
|
861 |
+
"sha256:b4bea75e47d9586d31e892a7401f76e909712a0fd510f58f5337bea9572c571e",
|
862 |
+
"sha256:b7b1fc9864d7d39e28f41d089bfd6353cb5f27ecd9905348c24187a768c79694",
|
863 |
+
"sha256:befe2bf740fd8373cf56149a5c23a0f601e82869598d41f8e188a0e9869926f8",
|
864 |
+
"sha256:c0bfb52d2169d58c1cdb8cc1f16989101639b34c7d3ce60ed70b19c63eba0b64",
|
865 |
+
"sha256:d11efb4dbecbdf22508d55e48d9c8384db795e1b7b51ea735289ff96613ff74d",
|
866 |
+
"sha256:dd80e219fd4c71fc3699fc1dadac5dcf4fd882bfc6f7ec53d30fa197b8ee22dc",
|
867 |
+
"sha256:e2926dac25b313635e4d6cf4dc4e51c8c0ebfed60b801c799ffc4c32bf3d1254",
|
868 |
+
"sha256:e98f220aa76ca2a977fe435f5b04d7b3470c0a2e6312907b37ba6068f26787f2",
|
869 |
+
"sha256:ed094d4f0c177b1b8e7aa9cba7d6ceed51c0e569a5318ac0ca9a090680a6a1b1",
|
870 |
+
"sha256:f136bab9c2cfd8da131132c2cf6cc27331dd6fae65f95f69dcd4ae3c3639c810",
|
871 |
+
"sha256:f3a86ed21e4f87050382c7bc96571755193c4c1392490744ac73d660e8f564a9"
|
872 |
+
],
|
873 |
+
"markers": "python_version >= '3.8'",
|
874 |
+
"version": "==1.24.4"
|
875 |
},
|
876 |
"openai": {
|
877 |
"hashes": [
|
|
|
1034 |
"markers": "python_version >= '3.8'",
|
1035 |
"version": "==10.0.0"
|
1036 |
},
|
1037 |
+
"pkgutil-resolve-name": {
|
1038 |
+
"hashes": [
|
1039 |
+
"sha256:357d6c9e6a755653cfd78893817c0853af365dd51ec97f3d358a819373bbd174",
|
1040 |
+
"sha256:ca27cc078d25c5ad71a9de0a7a330146c4e014c2462d9af19c6b828280649c5e"
|
1041 |
+
],
|
1042 |
+
"markers": "python_version < '3.9'",
|
1043 |
+
"version": "==1.3.10"
|
1044 |
+
},
|
1045 |
"pydantic": {
|
1046 |
"hashes": [
|
1047 |
"sha256:614eb3321eb600c81899a88fa9858b008e3c79e0d4f1b49ab1f516b4b0c27cfb",
|
|
|
1450 |
},
|
1451 |
"uvicorn": {
|
1452 |
"hashes": [
|
1453 |
+
"sha256:1d55d46b83ee4ce82b4e82f621f2050adb3eb7b5481c13f9af1744951cae2f1f",
|
1454 |
+
"sha256:da9b0c8443b2d7ee9db00a345f1eee6db7317432c9d4400f5049cc8d358383be"
|
1455 |
],
|
1456 |
"index": "pypi",
|
1457 |
"markers": "python_version >= '3.8'",
|
1458 |
+
"version": "==0.23.1"
|
1459 |
},
|
1460 |
"websockets": {
|
1461 |
"hashes": [
|
|
|
1612 |
],
|
1613 |
"markers": "python_version >= '3.7'",
|
1614 |
"version": "==1.9.2"
|
1615 |
+
},
|
1616 |
+
"zipp": {
|
1617 |
+
"hashes": [
|
1618 |
+
"sha256:679e51dd4403591b2d6838a48de3d283f3d188412a9782faadf845f298736ba0",
|
1619 |
+
"sha256:ebc15946aa78bd63458992fc81ec3b6f7b1e92d51c35e6de1c3804e73b799147"
|
1620 |
+
],
|
1621 |
+
"markers": "python_version < '3.10'",
|
1622 |
+
"version": "==3.16.2"
|
1623 |
}
|
1624 |
},
|
1625 |
"develop": {}
|
app.py
CHANGED
@@ -24,7 +24,6 @@ def search_resume(input_text):
|
|
24 |
return "No 'prediction' key found in the response or the 'body' is not a list."
|
25 |
|
26 |
examples = [["""
|
27 |
-
|
28 |
DATA SCIENTIST - GENTIS
|
29 |
========================
|
30 |
I am in contact with a top company in Ghent where they are looking for an additional Data Scientist. Beware... Once you start there, you won't be leaving anytime soon. The company likes to keep their employees happy, so few leave.
|
@@ -71,28 +70,29 @@ An attractive salary package with company car, accompanied by various extra-lega
|
|
71 |
39 days off per year
|
72 |
"""
|
73 |
]
|
74 |
-
|
75 |
]
|
76 |
-
|
77 |
-
# iface = gr.Interface(fn=search_resume,
|
78 |
-
# inputs=gr.inputs.Textbox(lines=7, placeholder="Enter Text Here..."),
|
79 |
-
# outputs="text",
|
80 |
-
# examples=examples
|
81 |
-
# )
|
82 |
-
# iface.launch()
|
83 |
-
#
|
84 |
demo = gr.Blocks()
|
85 |
|
86 |
|
87 |
with demo:
|
88 |
-
|
89 |
-
|
|
|
|
|
|
|
|
|
90 |
b1 = gr.Button("Search Resume")
|
91 |
-
text_search_result = gr.Textbox("Top resumes will appear here ...", label="Top resumes found in the database")
|
92 |
b1.click(search_resume, inputs=text_vacancy, outputs=text_search_result)
|
93 |
-
|
94 |
-
|
|
|
|
|
95 |
b2 = gr.Button("Write a relevant intro")
|
|
|
|
|
|
|
96 |
text_intro = gr.Textbox()
|
97 |
b2.click(intro.create,
|
98 |
inputs=[
|
|
|
24 |
return "No 'prediction' key found in the response or the 'body' is not a list."
|
25 |
|
26 |
examples = [["""
|
|
|
27 |
DATA SCIENTIST - GENTIS
|
28 |
========================
|
29 |
I am in contact with a top company in Ghent where they are looking for an additional Data Scientist. Beware... Once you start there, you won't be leaving anytime soon. The company likes to keep their employees happy, so few leave.
|
|
|
70 |
39 days off per year
|
71 |
"""
|
72 |
]
|
|
|
73 |
]
|
74 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
demo = gr.Blocks()
|
76 |
|
77 |
|
78 |
with demo:
|
79 |
+
gr.Markdown("""
|
80 |
+
# Recruiter Assistant
|
81 |
+
## 1. Provide a vacancy and get back relevant resumes from a database
|
82 |
+
We have about 1000 resumes in our database: https://huggingface.co/datasets/Sachinkelenjaguri/Resume_dataset
|
83 |
+
""")
|
84 |
+
text_vacancy = gr.Textbox(hint="Paste here a Vacancy...", lines=7, label="Copy/paste here a vacancy")
|
85 |
b1 = gr.Button("Search Resume")
|
86 |
+
text_search_result = gr.Textbox(hint="Top resumes will appear here ...", label="Top resumes found in the database")
|
87 |
b1.click(search_resume, inputs=text_vacancy, outputs=text_search_result)
|
88 |
+
gr.Markdown("""
|
89 |
+
## 2. Select an appropriate resume for this vacancy, paste it in the textfield and write a relevant introduction email
|
90 |
+
""")
|
91 |
+
text_resume = gr.Textbox(hint="Paste here a Resume...", label="Copy / Paste here your prefered resume from above and click the button to write an intro ")
|
92 |
b2 = gr.Button("Write a relevant intro")
|
93 |
+
gr.Markdown("""
|
94 |
+
## 3. You have a relevant introduction email to send to the customer
|
95 |
+
""")
|
96 |
text_intro = gr.Textbox()
|
97 |
b2.click(intro.create,
|
98 |
inputs=[
|