JinHyeong99 commited on
Commit
8c31276
1 Parent(s): c5d7e61
Files changed (1) hide show
  1. app.py +7 -6
app.py CHANGED
@@ -110,7 +110,8 @@ def handle_userinput(user_question):
110
 
111
  def main():
112
  load_dotenv()
113
- st.set_page_config(page_title="Chat with multiple Files",
 
114
  page_icon=":books:")
115
  st.write(css, unsafe_allow_html=True)
116
 
@@ -119,19 +120,19 @@ def main():
119
  if "chat_history" not in st.session_state:
120
  st.session_state.chat_history = None
121
 
122
- st.header("Chat with multiple Files :")
123
- user_question = st.text_input("Ask a question about your documents:")
124
  if user_question:
125
  handle_userinput(user_question)
126
 
127
  with st.sidebar:
128
- openai_key = st.text_input("Paste your OpenAI API key (sk-...)")
129
  if openai_key:
130
  os.environ["OPENAI_API_KEY"] = openai_key
131
 
132
- st.subheader("Your documents")
133
  docs = st.file_uploader(
134
- "Upload your PDFs here and click on 'Process'", accept_multiple_files=True)
135
  if st.button("Process"):
136
  with st.spinner("Processing"):
137
  # get pdf text
 
110
 
111
  def main():
112
  load_dotenv()
113
+ st.set_page_config(page_title="머신러닝_과제"
114
+ "LANGCHAIN과 STREAMLIT 기반의 RAG AI CHATBOT 구현",
115
  page_icon=":books:")
116
  st.write(css, unsafe_allow_html=True)
117
 
 
120
  if "chat_history" not in st.session_state:
121
  st.session_state.chat_history = None
122
 
123
+ st.header("GPT기반 챗봇: Prompt를 입력하세요.")
124
+ user_question = st.text_input("문서에 관해 질문해보세요.")
125
  if user_question:
126
  handle_userinput(user_question)
127
 
128
  with st.sidebar:
129
+ openai_key = st.text_input("OpenAI API key 복사 붙여넣기 하세요. (sk-...)")
130
  if openai_key:
131
  os.environ["OPENAI_API_KEY"] = openai_key
132
 
133
+ st.subheader("문서 올리기")
134
  docs = st.file_uploader(
135
+ "문서를 업로드 Process 버튼을 클릭하세요.'", accept_multiple_files=True)
136
  if st.button("Process"):
137
  with st.spinner("Processing"):
138
  # get pdf text