Anvit25 mandarmgd-03 commited on
Commit
edbb0e4
Β·
verified Β·
1 Parent(s): 81efa0d

Update readme (#1)

Browse files

- Update readme (350b0d6e58a8a50351fab191e4d77943f2c69399)


Co-authored-by: Mandar Garud <mandarmgd-03@users.noreply.huggingface.co>

Files changed (1) hide show
  1. readme +87 -99
readme CHANGED
@@ -1,99 +1,87 @@
1
- # πŸ€– Samsung Manual Chatbot
2
-
3
- A chatbot built with **LangChain**, **Gradio**, and **Hugging Face Transformers** that allows you to interact with the **Samsung Manual**.
4
- It uses embeddings + ChromaDB for retrieval and a conversational chain for contextual Q&A.
5
-
6
- ---
7
-
8
- ## πŸ“‚ Project Structure
9
-
10
- LLM_chatbot2/
11
- │── chroma_db/ # Persistent Chroma vector database
12
- │── temp_docs/ # Store documents (Samsung manual here)
13
- │── app.py # Main Gradio app
14
- │── requirements.txt # Dependencies
15
- │── README.md # Project documentation
16
- │── .gitattributes
17
-
18
- markdown
19
- Copy code
20
-
21
- ---
22
-
23
- ## βš™οΈ Features
24
-
25
- - πŸ“„ **Document Loading** – Loads and processes the Samsung manual (`temp_docs/samsung_manual.txt`).
26
- - βœ‚οΈ **Chunking** – Splits the document into manageable chunks for embeddings.
27
- - 🧠 **Embeddings** – Uses `sentence-transformers/all-MiniLM-L6-v2` for semantic search.
28
- - πŸ’Ύ **Vector Database** – Stores embeddings in **ChromaDB** for retrieval.
29
- - πŸ”„ **Conversational Memory** – Maintains chat context with `ConversationBufferMemory`.
30
- - πŸ—£οΈ **LLM Response** – Powered by `google/flan-t5-base` via Hugging Face pipeline.
31
- - 🎨 **Gradio UI** – Simple chat interface for interacting with the chatbot.
32
-
33
- ---
34
-
35
- ## πŸ“¦ Installation
36
-
37
- Clone the repository and install dependencies:
38
-
39
- ```bash
40
- git clone https://github.com/your-username/LLM_chatbot2.git
41
- cd LLM_chatbot2
42
- pip install -r requirements.txt
43
- ▢️ Running the App
44
- Make sure you have the Samsung manual text file at temp_docs/samsung_manual.txt.
45
-
46
- Then run:
47
-
48
- bash
49
- Copy code
50
- python app.py
51
- Gradio will launch a local server. Open the link shown in the terminal (usually http://127.0.0.1:7860) to interact with the chatbot.
52
-
53
- πŸ“ Requirements
54
- Dependencies are listed in requirements.txt:
55
-
56
- nginx
57
- Copy code
58
- pypdf
59
- gradio
60
- langchain
61
- chromadb
62
- sentence-transformers
63
- transformers
64
- torch
65
- πŸš€ Usage
66
- Place your document inside temp_docs/ (default: samsung_manual.txt).
67
-
68
- Run the app.
69
-
70
- Ask natural language questions like:
71
-
72
- "How do I reset my Samsung washing machine?"
73
-
74
- "Explain the safety precautions in the manual."
75
-
76
- The chatbot retrieves relevant chunks from the document and answers conversationally.
77
-
78
- πŸ› οΈ Customization
79
- Change the document: Replace temp_docs/samsung_manual.txt with any .txt file.
80
-
81
- Switch embeddings: Modify MODEL_NAME_EMBEDDINGS in app.py.
82
-
83
- Try different LLMs: Update MODEL_ID_LLM to another Hugging Face model.
84
-
85
- πŸ“œ License
86
- This project is open-source under the MIT License.
87
-
88
- yaml
89
- Copy code
90
-
91
- ---
92
-
93
- Do you want me to also **add example screenshots of the Gradio UI** in the README (like showing how a query/response looks), or keep it text-only?
94
-
95
-
96
-
97
-
98
-
99
-
 
1
+ # Samsung Manual Chatbot
2
+
3
+ A chatbot built with **LangChain**, **Gradio**, and **Hugging Face Transformers** that allows you to interact with the **Samsung Manual**.
4
+ It uses embeddings + ChromaDB for retrieval and a conversational chain for contextual Q&A.
5
+
6
+ ---
7
+
8
+ ## Project Structure
9
+
10
+ LLM_chatbot2/
11
+ │── chroma_db/ # Persistent Chroma vector database
12
+ │── temp_docs/ # Store documents (Samsung manual here)
13
+ │── app.py # Main Gradio app
14
+ │── requirements.txt # Dependencies
15
+ │── README.md # Project documentation
16
+ │── .gitattributes
17
+ ---
18
+
19
+ ## Features
20
+
21
+ - **Document Loading** – Loads and processes the Samsung manual (`temp_docs/samsung_manual.txt`).
22
+ - **Chunking** – Splits the document into manageable chunks for embeddings.
23
+ - **Embeddings** – Uses `sentence-transformers/all-MiniLM-L6-v2` for semantic search.
24
+ - **Vector Database** – Stores embeddings in **ChromaDB** for retrieval.
25
+ - **Conversational Memory** – Maintains chat context with `ConversationBufferMemory`.
26
+ - **LLM Response** – Powered by `google/flan-t5-base` via Hugging Face pipeline.
27
+ - **Gradio UI** – Simple chat interface for interacting with the chatbot.
28
+
29
+ ---
30
+
31
+ ## Installation
32
+
33
+ Clone the repository and install dependencies:
34
+
35
+ ```bash
36
+ git clone https://github.com/Anvit25/LLM_chatbot2.git
37
+ cd LLM_chatbot2
38
+ pip install -r requirements.txt
39
+ Running the App
40
+ Make sure you have the Samsung manual text file at temp_docs/samsung_manual.txt.
41
+
42
+ Then run:
43
+
44
+ python app.py
45
+ Gradio will launch a local server. Open the link shown in the terminal (usually http://127.0.0.1:7860) to interact with the chatbot.
46
+
47
+ ## Requirements
48
+ Dependencies are listed in requirements.txt:
49
+
50
+ pypdf
51
+ gradio
52
+ langchain
53
+ chromadb
54
+ sentence-transformers
55
+ transformers
56
+ torch
57
+
58
+ ## Usage
59
+ Place your document inside temp_docs/ (default: samsung_manual.txt).
60
+
61
+ Run the app.
62
+
63
+ Ask natural language questions like:
64
+
65
+ "How do I reset my Samsung washing machine?"
66
+
67
+ "Explain the safety precautions in the manual."
68
+
69
+ The chatbot retrieves relevant chunks from the document and answers conversationally.
70
+
71
+ ## Customization
72
+ Change the document: Replace temp_docs/samsung_manual.txt with any .txt file.
73
+
74
+ Switch embeddings: Modify MODEL_NAME_EMBEDDINGS in app.py.
75
+
76
+ Try different LLMs: Update MODEL_ID_LLM to another Hugging Face model.
77
+
78
+ ## License
79
+ This project is open-source under the MIT License.
80
+
81
+ ---
82
+
83
+
84
+
85
+
86
+
87
+