vinhnx90 commited on
Commit
f57788d
β€’
1 Parent(s): 004f04c

Update README

Browse files
Files changed (2) hide show
  1. README.md +1 -1
  2. app.py +13 -7
README.md CHANGED
@@ -17,7 +17,7 @@ The app allows users to upload documents (PDFs or text files), and then ask ques
17
  - **Retrieval-Augmented Generation (RAG)**: Utilizes a RAG model for context-aware question answering.
18
  - **LangChain Integration**: Leverages LangChain for building the RAG model.
19
  - **ChromaDB**: Efficient vector storage and retrieval using ChromaDB.
20
- - **OpenAI Language Models**: Powered by OpenAI's language models for answer generation.
21
  - **Streamlit UI**: Interactive and user-friendly web interface.
22
 
23
  ## Installation
 
17
  - **Retrieval-Augmented Generation (RAG)**: Utilizes a RAG model for context-aware question answering.
18
  - **LangChain Integration**: Leverages LangChain for building the RAG model.
19
  - **ChromaDB**: Efficient vector storage and retrieval using ChromaDB.
20
+ - **OpenAI Language Models**: Use `gpt-3.5-turbo` embedding model for answer generation.
21
  - **Streamlit UI**: Interactive and user-friendly web interface.
22
 
23
  ## Installation
app.py CHANGED
@@ -69,17 +69,19 @@ def main():
69
  """
70
  st.set_page_config(page_title="Chat with Document", page_icon="πŸ“š")
71
 
72
- st.title("πŸ“š Chat with Document")
73
  st.write("Upload a document and ask questions related to its content.")
74
 
75
  uploaded_file = st.file_uploader(
76
  "Upload a file", type=["pdf", "docx", "txt"], key="file_uploader"
77
  )
78
- add_file = st.button(
79
- "Process File",
80
- on_click=clear_history,
81
- key="process_button",
82
- )
 
 
83
 
84
  if uploaded_file and add_file:
85
  with st.spinner("Processing file..."):
@@ -90,7 +92,11 @@ def main():
90
  st.success("File processed successfully!")
91
 
92
  st.markdown("## Ask a Question")
93
- question = st.text_area("Enter your question", height=200, key="question_input")
 
 
 
 
94
  submit_button = st.button("Submit", key="submit_button")
95
 
96
  if submit_button and "crc" in st.session_state:
 
69
  """
70
  st.set_page_config(page_title="Chat with Document", page_icon="πŸ“š")
71
 
72
+ st.title("πŸ“š InkChatGPT")
73
  st.write("Upload a document and ask questions related to its content.")
74
 
75
  uploaded_file = st.file_uploader(
76
  "Upload a file", type=["pdf", "docx", "txt"], key="file_uploader"
77
  )
78
+
79
+ if uploaded_file:
80
+ add_file = st.button(
81
+ "Process File",
82
+ on_click=clear_history,
83
+ key="process_button",
84
+ )
85
 
86
  if uploaded_file and add_file:
87
  with st.spinner("Processing file..."):
 
92
  st.success("File processed successfully!")
93
 
94
  st.markdown("## Ask a Question")
95
+ question = st.text_area(
96
+ "Enter your question",
97
+ height=200,
98
+ key="question_input",
99
+ )
100
  submit_button = st.button("Submit", key="submit_button")
101
 
102
  if submit_button and "crc" in st.session_state: