Skip to content

Commit

Permalink
nltk fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
jiatastic committed Jul 24, 2023
1 parent e146c59 commit bc6364f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pages/Behavioral Screen.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from langchain.vectorstores import FAISS
import base64
from IPython.display import Audio
import nltk

### ————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
def load_lottiefile(filepath: str):
Expand Down Expand Up @@ -53,6 +54,7 @@ def update_markdown(audio_md):
update_markdown(global_audio_md)

def save_vector(text: str):
nltk.download('punkt')
text_splitter = NLTKTextSplitter()
texts = text_splitter.split_text(text)
# Create emebeddings
Expand Down
2 changes: 2 additions & 0 deletions pages/Professional Screen.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ class Message:

def save_vector(text):
"""embeddings"""

nltk.download('punkt')
text_splitter = NLTKTextSplitter()
texts = text_splitter.split_text(text)
# Create emebeddings
Expand Down
3 changes: 3 additions & 0 deletions pages/Resume Screen.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from streamlit_lottie import st_lottie
import json
from IPython.display import Audio
import nltk

### ——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
def load_lottiefile(filepath: str):
Expand All @@ -37,6 +38,8 @@ class Message:
message: str

def save_vector(resume):
"""embeddings"""
nltk.download('punkt')
pdf_reader = PdfReader(resume)
text = ""
for page in pdf_reader.pages:
Expand Down

0 comments on commit bc6364f

Please sign in to comment.