Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -76,7 +76,7 @@ def set_custom_css():
|
|
76 |
|
77 |
def get_docparser_data(file, api_key, parser_id) -> Optional[dict]:
|
78 |
upload_url = f"https://api.docparser.com/v1/document/upload/{parser_id}"
|
79 |
-
auth = (api_key, '') # Use HTTP Basic Auth with the API key
|
80 |
files = {'file': file}
|
81 |
try:
|
82 |
# Upload the document
|
@@ -379,7 +379,7 @@ def main():
|
|
379 |
choice = st.sidebar.selectbox("Menu", menu)
|
380 |
|
381 |
if choice == "Home":
|
382 |
-
analysis_type = st.selectbox("Select Analysis Type:", ["Single Resume", "
|
383 |
method_choice = st.selectbox("Select Method:", ["Use LLM", "Use Field Extraction"])
|
384 |
|
385 |
openai_key = None # Initialize openai_key
|
@@ -425,7 +425,7 @@ def main():
|
|
425 |
else:
|
426 |
st.warning("Failed to process the resume.")
|
427 |
|
428 |
-
elif analysis_type == "
|
429 |
uploaded_files = st.file_uploader("Upload multiple resume PDF files", type="pdf", accept_multiple_files=True)
|
430 |
|
431 |
if st.button("Analyze Resumes"):
|
@@ -452,7 +452,7 @@ def main():
|
|
452 |
|
453 |
with st.expander("ℹ️ How to use"):
|
454 |
st.markdown("""
|
455 |
-
1. Select the analysis type: Single Resume or
|
456 |
2. Choose the method: Use LLM or Use Field Extraction.
|
457 |
3. If using LLM, enter the OpenAI API key.
|
458 |
4. If using Field Extraction, enter the Docparser API key and Parser ID.
|
|
|
76 |
|
77 |
def get_docparser_data(file, api_key, parser_id) -> Optional[dict]:
|
78 |
upload_url = f"https://api.docparser.com/v1/document/upload/{parser_id}"
|
79 |
+
auth = (api_key, '') # Use HTTP Basic Auth with the API key as username and empty password
|
80 |
files = {'file': file}
|
81 |
try:
|
82 |
# Upload the document
|
|
|
379 |
choice = st.sidebar.selectbox("Menu", menu)
|
380 |
|
381 |
if choice == "Home":
|
382 |
+
analysis_type = st.selectbox("Select Analysis Type:", ["Single Resume", "Folder Upload"])
|
383 |
method_choice = st.selectbox("Select Method:", ["Use LLM", "Use Field Extraction"])
|
384 |
|
385 |
openai_key = None # Initialize openai_key
|
|
|
425 |
else:
|
426 |
st.warning("Failed to process the resume.")
|
427 |
|
428 |
+
elif analysis_type == "Folder Upload":
|
429 |
uploaded_files = st.file_uploader("Upload multiple resume PDF files", type="pdf", accept_multiple_files=True)
|
430 |
|
431 |
if st.button("Analyze Resumes"):
|
|
|
452 |
|
453 |
with st.expander("ℹ️ How to use"):
|
454 |
st.markdown("""
|
455 |
+
1. Select the analysis type: Single Resume or Folder Upload.
|
456 |
2. Choose the method: Use LLM or Use Field Extraction.
|
457 |
3. If using LLM, enter the OpenAI API key.
|
458 |
4. If using Field Extraction, enter the Docparser API key and Parser ID.
|