Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
@@ -1,13 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
---
|
12 |
|
13 |
-
|
|
|
1 |
+
Hereβs the updated `README.md` without the "How to Run Locally" part:
|
2 |
+
|
3 |
+
---
|
4 |
+
|
5 |
+
# Chat With Documents π€π
|
6 |
+
|
7 |
+
Welcome to the **Chat with Documents** app! π This Streamlit app allows you to upload PDF and PPT files, extract their content, store the extracted text in a vector store, and interact with it using natural language queries! π€π¬
|
8 |
+
|
9 |
+
Built with **LangChain**, **OpenAI**, **Streamlit**, and **Astra DB**, this project leverages the power of LLMs (Large Language Models) to allow users to chat with their documents like never before. π§
|
10 |
+
|
11 |
+
---
|
12 |
+
|
13 |
+
### π **Features**
|
14 |
+
|
15 |
+
- **PDF & PPT Extraction**: Upload PDF and PowerPoint files to extract text! πβ‘οΈπ
|
16 |
+
- **Vector Store**: Automatically stores extracted text in a **Cassandra** vector store. ππ
|
17 |
+
- **Ask Anything**: Ask questions about the document, and get answers powered by **OpenAI**! π€β
|
18 |
+
|
19 |
+
---
|
20 |
+
|
21 |
+
### π οΈ **Tech Stack**
|
22 |
+
- **Streamlit**: Frontend framework to interact with the app.
|
23 |
+
- **LangChain**: For seamless document processing and querying.
|
24 |
+
- **OpenAI**: For LLM integration to provide intelligent responses.
|
25 |
+
- **Astra DB**: Database for storing and managing vectorized text data.
|
26 |
+
- **Python Libraries**: PyPDF2, python-pptx, cassio, and more.
|
27 |
+
|
28 |
+
---
|
29 |
+
|
30 |
+
### π **Deployment**
|
31 |
+
|
32 |
+
This project is designed to be deployed on **Hugging Face Spaces**. Just upload your code, and it will run in the cloud! π©οΈ
|
33 |
+
|
34 |
+
Make sure to configure the **Secrets** in Hugging Face Spaces for storing your sensitive API keys securely! π
|
35 |
+
|
36 |
+
---
|
37 |
+
|
38 |
+
### π‘ **How It Works**
|
39 |
+
|
40 |
+
- Upload a **PDF** or **PPT** file using the file uploader. π€
|
41 |
+
- The app will extract text from the file using **PyPDF2** (for PDFs) or **python-pptx** (for PPTs). πβ‘οΈπ
|
42 |
+
- The extracted text is split into manageable chunks using **LangChain's CharacterTextSplitter**. βοΈ
|
43 |
+
- The chunks are then added to **Cassandra** as vectorized data using **OpenAI embeddings**. π
|
44 |
+
- Ask any query about the content of your document, and the app will respond using the power of **OpenAI**! π€π¬
|
45 |
+
|
46 |
+
---
|
47 |
+
|
48 |
+
### π― **Why Use This?**
|
49 |
+
|
50 |
+
- **Make documents interactive**: Easily explore the content of your documents by asking questions.
|
51 |
+
- **Quick retrieval**: With the text stored in a vector store, you can query the content efficiently.
|
52 |
+
- **Secure API keys**: API keys are securely managed using environment variables and **Hugging Face Spaces Secrets**. ππΌ
|
53 |
+
|
54 |
+
---
|
55 |
+
|
56 |
+
### π€ **Contributing**
|
57 |
+
|
58 |
+
Feel free to fork this repo and submit issues or pull requests for any bugs or improvements. Contributions are welcome! π
|
59 |
+
|
60 |
---
|
61 |
+
|
62 |
+
### π§βπ» **License**
|
63 |
+
|
64 |
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
65 |
+
|
66 |
+
---
|
67 |
+
|
68 |
+
### π **Note**
|
69 |
+
|
70 |
+
Remember to add your API keys and check the environment variables! If you're using Hugging Face Spaces, ensure your keys are added to the **Secrets** section. π
|
71 |
+
|
72 |
+
---
|
73 |
+
|
74 |
+
### β¨ **Enjoy the App!** β¨
|
75 |
+
Now, go ahead and chat with your documents! π
|
76 |
+
|
77 |
---
|
78 |
|
79 |
+
This version now only focuses on the appβs features and deployment, making it more suited for hosting and sharing on Hugging Face Spaces!
|