Skip to content

Commit

Permalink
refactor: 데이터 수정에 대응
Browse files Browse the repository at this point in the history
  • Loading branch information
kooqooo committed Aug 8, 2024
1 parent 67f5197 commit 56e118a
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions pages/3_gene_question.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@

### JD 사용하여 JD 추출용 프롬프트 만들기
st.session_state.logger.info("prompt JD start")
prompt_template_jd = read_prompt_from_txt(os.path.join(DATA_DIR, "test", "prompt_JD_template.txt"))
prompt_template_jd = read_prompt_from_txt(os.path.join(DATA_DIR, "prompts", "prompt_JD_template.txt"))
st.session_state.prompt_JD = create_prompt_with_jd(prompt_template_jd)

# prompt_JD 생성완료
Expand All @@ -163,7 +163,7 @@
# prompt_qa_template #######################################

st.session_state.logger.info("prompt resume start")
prompt_template_resume = read_prompt_from_txt(os.path.join(DATA_DIR, "test", "prompt_resume_template.txt"))
prompt_template_resume = read_prompt_from_txt(os.path.join(DATA_DIR, "prompts", "prompt_resume_template.txt"))

st.session_state.logger.info("create prompt resume template")
st.session_state.prompt_resume = create_prompt_with_resume(prompt_template_resume)
Expand Down Expand Up @@ -192,7 +192,7 @@

## step3 :
st.session_state.logger.info("prompt question start")
prompt_template_question = read_prompt_from_txt(os.path.join(DATA_DIR, "test", "prompt_question_template.txt"))
prompt_template_question = read_prompt_from_txt(os.path.join(DATA_DIR, "prompts", "prompt_question_template.txt"))

st.session_state.logger.info("create prompt question template")
st.session_state.prompt_question = create_prompt_with_question(prompt_template_question)
Expand Down
4 changes: 2 additions & 2 deletions pages/3_gene_question_no_resume.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@

### JD 사용하여 JD 추출용 프롬프트 만들기
st.session_state.logger.info("prompt JD start")
prompt_template_jd = read_prompt_from_txt(os.path.join(DATA_DIR, "test", "prompt_JD_template.txt"))
prompt_template_jd = read_prompt_from_txt(os.path.join(DATA_DIR, "prompts", "prompt_JD_template.txt"))
st.session_state.prompt_JD = create_prompt_with_jd(prompt_template_jd)

# prompt_JD 생성완료
Expand All @@ -148,7 +148,7 @@

## step2 JD 만을 이용해 질문 6개를 생성합니다 :
st.session_state.logger.info("prompt question start")
prompt_noResume_question_template = read_prompt_from_txt(os.path.join(DATA_DIR, "test", "prompt_noResume_question_template.txt"))
prompt_noResume_question_template = read_prompt_from_txt(os.path.join(DATA_DIR, "prompts", "prompt_noResume_question_template.txt"))

st.session_state.logger.info("create no resume prompt question template")
st.session_state.prompt_question = create_prompt_with_no_resume(prompt_noResume_question_template)
Expand Down
4 changes: 2 additions & 2 deletions pages/4_show_questions_hint.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@

st.title(f"{st.session_state.user_name}님의 기술면접 예상 질문입니다.🤗 ")

st.session_state.prompt_template_fb = read_prompt_from_txt(os.path.join(DATA_DIR, "test", "prompt_feedback.txt"))
st.session_state.prompt_template_ht = read_prompt_from_txt(os.path.join(DATA_DIR, "test", "prompt_hint.txt"))
st.session_state.prompt_template_fb = read_prompt_from_txt(os.path.join(DATA_DIR, "prompts", "prompt_feedback.txt"))
st.session_state.prompt_template_ht = read_prompt_from_txt(os.path.join(DATA_DIR, "prompts", "prompt_hint.txt"))


# 각 질문에 대해 번호를 매기고 토글 위젯 생성
Expand Down
2 changes: 1 addition & 1 deletion src/gene_question_2chain_ver.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
### JD 사용하여 JD 추출용 프롬프트 만들기
st.session_state.logger.info("prompt JD start")

prompt_template = read_prompt_from_txt(PATH + "data", "test", "prompt_JD_template.txt")
prompt_template = read_prompt_from_txt(DATA_DIR, "prompts", "prompt_JD_template.txt")

prompt_JD = create_prompt_with_jd(prompt_template)
# prompt_JD 생성완료
Expand Down
2 changes: 1 addition & 1 deletion src/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def load_chain(question):

# Load OpenAI chat model
llm = ChatOpenAI(temperature=0)
template = read_prompt_from_txt(os.path.join(DATA_DIR, "test", "tail_question_template.txt"))
template = read_prompt_from_txt(os.path.join(DATA_DIR, "prompts", "tail_question_template.txt"))

# Create memory 'chat_history'
memory = ConversationBufferWindowMemory(human_prefix="면접자 답변", ai_prefix="answer")
Expand Down

0 comments on commit 56e118a

Please sign in to comment.