Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
import os
|
2 |
import re
|
3 |
-
import torch #
|
4 |
import tempfile
|
5 |
from io import BytesIO
|
6 |
|
@@ -13,6 +13,7 @@ from pdf2image import convert_from_bytes
|
|
13 |
# Load the OCR Pipeline (Uses Torch)
|
14 |
#####################################
|
15 |
try:
|
|
|
16 |
ocr_pipeline = pipeline("image-to-text", model="YouLiXiya/tinyllava-v1.0-1.1b-hf")
|
17 |
st.write("Model loaded successfully!")
|
18 |
except Exception as e:
|
@@ -144,7 +145,7 @@ def process_resume(file_obj, company_requirements):
|
|
144 |
#####################################
|
145 |
st.title("Resume Extraction and Candidate Matching")
|
146 |
st.markdown("""
|
147 |
-
This app uses an image-to-text pipeline (powered by `
|
148 |
extract details from uploaded resume files (PDF or image formats). It then parses critical candidate
|
149 |
information and compares it against company requirements.
|
150 |
""")
|
|
|
1 |
import os
|
2 |
import re
|
3 |
+
import torch # Explicitly imported if you want to use torch directly
|
4 |
import tempfile
|
5 |
from io import BytesIO
|
6 |
|
|
|
13 |
# Load the OCR Pipeline (Uses Torch)
|
14 |
#####################################
|
15 |
try:
|
16 |
+
# Make sure that you're using an updated version of the transformers library (>=4.x)
|
17 |
ocr_pipeline = pipeline("image-to-text", model="YouLiXiya/tinyllava-v1.0-1.1b-hf")
|
18 |
st.write("Model loaded successfully!")
|
19 |
except Exception as e:
|
|
|
145 |
#####################################
|
146 |
st.title("Resume Extraction and Candidate Matching")
|
147 |
st.markdown("""
|
148 |
+
This app uses an image-to-text pipeline (powered by `YouLiXiya/tinyllava-v1.0-1.1b-hf` and PyTorch) to
|
149 |
extract details from uploaded resume files (PDF or image formats). It then parses critical candidate
|
150 |
information and compares it against company requirements.
|
151 |
""")
|