Spaces:
Running
Running
Update some Data
Browse files
app.py
CHANGED
|
@@ -20,21 +20,41 @@ def upload_blob(pdf_name, json_data, pdf_data):
|
|
| 20 |
pdf_blob_client = container_client.get_blob_client(pdf_blob_name)
|
| 21 |
pdf_blob_client.upload_blob(pdf_data, overwrite=True)
|
| 22 |
|
| 23 |
-
|
|
|
|
|
|
|
| 24 |
|
| 25 |
|
| 26 |
def main():
|
| 27 |
-
st.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
|
| 29 |
-
|
|
|
|
|
|
|
| 30 |
|
| 31 |
job_title = st.text_input("Enter the job title:")
|
| 32 |
email = st.text_input("Enter the email:")
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
if job_title and email:
|
| 36 |
data = {
|
| 37 |
-
"
|
| 38 |
"email": email
|
| 39 |
}
|
| 40 |
json_data = json.dumps(data, ensure_ascii=False)
|
|
|
|
| 20 |
pdf_blob_client = container_client.get_blob_client(pdf_blob_name)
|
| 21 |
pdf_blob_client.upload_blob(pdf_data, overwrite=True)
|
| 22 |
|
| 23 |
+
link = "http://127.0.0.1:7860/?job="+pdf_name
|
| 24 |
+
|
| 25 |
+
st.write('Data and PDF have been successfully uploaded. The link to the chatbot for the potential candidates is the following: '+link)
|
| 26 |
|
| 27 |
|
| 28 |
def main():
|
| 29 |
+
st.markdown(
|
| 30 |
+
"""
|
| 31 |
+
<style>
|
| 32 |
+
[data-testid=column]{
|
| 33 |
+
text-align: center;
|
| 34 |
+
display: flex;
|
| 35 |
+
align-items: center;
|
| 36 |
+
justify-content: center;
|
| 37 |
+
}
|
| 38 |
+
</style>
|
| 39 |
+
""",
|
| 40 |
+
unsafe_allow_html=True,
|
| 41 |
+
)
|
| 42 |
+
col1, col2 = st.columns([2, 1])
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
col1.title("Job description upload")
|
| 46 |
+
col2.image("https://www.workgenius.com/wp-content/uploads/2023/03/WorkGenius_navy-1.svg")
|
| 47 |
|
| 48 |
+
st.write("Please upload the job description as a PDF and enter the job title for the position. To receive the evaluation of the potential candidates, please enter your email address.")
|
| 49 |
+
|
| 50 |
+
uploaded_file = st.file_uploader("Upload a PDF file:", type=["pdf"])
|
| 51 |
|
| 52 |
job_title = st.text_input("Enter the job title:")
|
| 53 |
email = st.text_input("Enter the email:")
|
| 54 |
+
if st.button("Submit"):
|
| 55 |
+
if len(job_title) > 0 and len(email) > 0 and uploaded_file:
|
|
|
|
| 56 |
data = {
|
| 57 |
+
"title": job_title,
|
| 58 |
"email": email
|
| 59 |
}
|
| 60 |
json_data = json.dumps(data, ensure_ascii=False)
|