-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy pathcv_scanner.py
26 lines (22 loc) · 903 Bytes
/
cv_scanner.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import streamlit as st
from constants import *
def download_template(template_file=TEMPLATE_FILE):
content_file = open(template_file,'r')
content = content_file.read()
st.download_button('The first step is to fill the CV. Download the template here :rocket:', content) # Defaults to 'text/plain'
content_file.close()
def download_result(template_file=RESULT_FILE):
content_file = open(template_file,'r')
content = content_file.read()
st.download_button('Download the result of your AI improved CV here :wink:', content) # Defaults to 'text/plain'
content_file.close()
def experience_parser(text_cv):
list_experiences = text_cv.split('EXPERIENCE ')
selected_experience = []
for l in list_experiences:
try:
int(l[0][0])
selected_experience.append(l)
except:
continue
return selected_experience