yashkavaiya commited on
Commit
dc1f832
·
verified ·
1 Parent(s): 5f51516

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +96 -12
README.md CHANGED
@@ -1,12 +1,96 @@
1
- ---
2
- title: WebsiteRAG
3
- emoji: 💻
4
- colorFrom: indigo
5
- colorTo: gray
6
- sdk: gradio
7
- sdk_version: 4.42.0
8
- app_file: app.py
9
- pinned: false
10
- ---
11
-
12
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ # Website RAG Chatbot
3
+ This project implements a Retrieval-Augmented Generation (RAG) system using Langchain, Google's Generative AI, and Gradio. It creates a chatbot interface that answers questions based on information retrieved from a pre-processed set of web pages.
4
+
5
+ ## Features
6
+
7
+ - Web-based chatbot interface using Gradio
8
+ - RAG system powered by Langchain and Google's Generative AI
9
+ - Local FAISS vector store for efficient information retrieval
10
+ - Customizable UI with CSS styling
11
+
12
+ ## Prerequisites
13
+
14
+ - Python 3.9 or higher
15
+ - Google API key for access to Generative AI models
16
+ - Langchain API key
17
+ - Pre-processed FAISS index (stored in `./Vector_DB/faiss_index`)
18
+
19
+ ## Installation
20
+
21
+ 1. Clone this repository:
22
+ ```
23
+ git clone
24
+ cd website-rag-chatbot
25
+ ```
26
+
27
+ 2. Install the required packages:
28
+ ```
29
+ pip install -r requirements.txt
30
+ ```
31
+
32
+ 3. Set up your environment variables:
33
+ Create a `.env` file in the project root and add the following:
34
+ ```
35
+ GOOGLE_API_KEY=your_google_api_key
36
+ LANGCHAIN_API_KEY=your_langchain_api_key
37
+ ```
38
+
39
+ ## Usage
40
+
41
+ To run the chatbot locally:
42
+
43
+ ```
44
+ python app.py
45
+ ```
46
+
47
+ This will start the Gradio interface, typically accessible at `http://localhost:7860`.
48
+
49
+ ## Deployment
50
+
51
+ This project is configured for deployment to Google Cloud Run.
52
+
53
+ 1. Build the Docker image:
54
+ ```
55
+ docker build -t website-rag-chatbot .
56
+ ```
57
+
58
+ 2. Tag and push the image to Google Container Registry:
59
+ ```
60
+ docker tag website-rag-chatbot gcr.io/your-project-id/website-rag-chatbot
61
+ docker push gcr.io/your-project-id/website-rag-chatbot
62
+ ```
63
+
64
+ 3. Deploy to Cloud Run:
65
+ ```
66
+ gcloud run deploy website-rag-chatbot --image gcr.io/your-project-id/website-rag-chatbot --platform managed
67
+ ```
68
+
69
+ Remember to set the necessary environment variables in the Cloud Run configuration.
70
+
71
+ ## Project Structure
72
+
73
+ - `app.py`: Main application file containing the Gradio interface and RAG logic
74
+ - `Dockerfile`: Configuration for containerizing the application
75
+ - `requirements.txt`: List of Python package dependencies
76
+ - `Vector_DB/faiss_index`: Pre-processed FAISS index (not included in repository)
77
+
78
+ ## Contributing
79
+
80
+ Contributions are welcome! Please feel free to submit a Pull Request.
81
+
82
+ ## License
83
+
84
+ This project is licensed under the MIT License - see the LICENSE file for details.
85
+
86
+ ## Acknowledgments
87
+
88
+ - Langchain for the RAG framework
89
+ - Google for the Generative AI models
90
+ - Gradio for the easy-to-use interface building
91
+
92
+ ## Contact
93
+
94
+ Created by Yash Kavaiya - feel free to contact me!
95
+ - GitHub: [https://github.com/Yash-Kavaiya](https://github.com/Yash-Kavaiya)
96
+ - LinkedIn: [https://linkedin.com/in/Yash-Kavaiya](https://linkedin.com/in/Yash-Kavaiya)