sid22669 commited on
Commit
2acd771
·
verified ·
1 Parent(s): 72ba853

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -10
app.py CHANGED
@@ -30,15 +30,6 @@ def read_uploaded_file(uploaded_file):
30
  elif ext == ".txt":
31
  return uploaded_file.read().decode("utf-8").strip()
32
 
33
- elif ext == ".docx":
34
- try:
35
- doc = Document(file_path)
36
- text = "\n".join([para.text for para in doc.paragraphs])
37
- return text.strip()
38
- except Exception as e:
39
- return f"Error reading DOCX file: {str(e)}"
40
-
41
-
42
  else:
43
  return "Unsupported file type."
44
 
@@ -78,7 +69,7 @@ def log_or_update(serial_id, timestamp, resume_text, model_prediction, corrected
78
  st.title("📄 Resume Role Classifier")
79
 
80
  uploaded_file = st.file_uploader(
81
- "Upload your resume (PDF, TXT, DOC, or DOCX format)",
82
  type=["pdf", "txt", "doc", "docx"]
83
  )
84
 
 
30
  elif ext == ".txt":
31
  return uploaded_file.read().decode("utf-8").strip()
32
 
 
 
 
 
 
 
 
 
 
33
  else:
34
  return "Unsupported file type."
35
 
 
69
  st.title("📄 Resume Role Classifier")
70
 
71
  uploaded_file = st.file_uploader(
72
+ "Upload your resume (PDF, TXT format)",
73
  type=["pdf", "txt", "doc", "docx"]
74
  )
75