Jatin Mehra commited on
Commit
5143d98
Β·
unverified Β·
1 Parent(s): 482c230

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +182 -0
README.md ADDED
@@ -0,0 +1,182 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # CRAWLGPT πŸ€–
2
+
3
+ A powerful web content crawler with GPT-powered summarization and chat capabilities. CRAWLGPT extracts content from URLs, stores it in a vector database (FAISS), and enables natural language querying of the stored content. It combines modern web crawling technology with advanced language models to help you extract, analyze, and interact with web content intelligently.
4
+
5
+ ## 🌟 Features
6
+
7
+ - **Web Crawling**
8
+ Async-based crawling powered by [crawl4ai](https://pypi.org/project/crawl4ai/) and Playwright.
9
+ Includes configurable rate limiting and content validation.
10
+
11
+ - **Content Processing**
12
+ Automatically chunks large texts, generates embeddings, and summarizes text via the Groq API.
13
+
14
+ - **Chat Interface**
15
+ Streamlit-based UI with a user-friendly chat panel.
16
+ Supports summarized or full-text retrieval (RAG) for context injection.
17
+
18
+ - **Data Management**
19
+ Stores content in a local or in-memory vector database (FAISS) for efficient retrieval.
20
+ Tracks usage metrics and supports import/export of system state.
21
+
22
+ - **Testing**
23
+ Comprehensive unit and integration tests using Python’s `unittest` framework.
24
+
25
+
26
+ ## πŸŽ₯ Demo
27
+
28
+
29
+ _Example of CRAWLGPT in action!_
30
+
31
+ ## πŸ”§ Requirements
32
+
33
+ - Python >= 3.8
34
+ - Operating System: OS Independent
35
+ - Required packages are handled by the setup script.
36
+
37
+
38
+ ## πŸš€ Quick Start
39
+
40
+ 1. Clone the Repository:
41
+
42
+ ```git clone https://github.com/Jatin-Mehra119/CRAWLGPT.git
43
+ cd CRAWLGPT
44
+ ```
45
+
46
+ 2. Run the Setup Script:
47
+
48
+ ```
49
+ python -m setup_env
50
+ ```
51
+
52
+ _This script installs dependencies, creates a virtual environment, and prepares the project._
53
+
54
+ 3. Update Your Environment Variables:
55
+
56
+ - Create or modify the `.env` file.
57
+ - Add your Groq API key and Ollama API key. Learn how to get API keys.
58
+
59
+
60
+ ```
61
+ GROQ_API_KEY=your_groq_api_key_here
62
+ OLLAMA_API_TOKEN=your_ollama_api_key_here
63
+ ```
64
+
65
+ 4. Activate the Virtual Environment:
66
+
67
+ ```
68
+ source .venv/bin/activate # On Unix/macOS
69
+ .venv\Scripts\activate # On Windows
70
+ ```
71
+
72
+ 5. Run the Application:
73
+ ```
74
+ python -m streamlit run src/crawlgpt/ui/chat_app.py
75
+ ```
76
+
77
+ ## πŸ“¦ Dependencies
78
+
79
+ ### Core Dependencies
80
+
81
+ - `streamlit==1.41.1`
82
+ - `groq==0.15.0`
83
+ - `sentence-transformers==3.3.1`
84
+ - `faiss-cpu==1.9.0.post1`
85
+ - `crawl4ai==0.4.247`
86
+ - `python-dotenv==1.0.1`
87
+ - `pydantic==2.10.5`
88
+ - `aiohttp==3.11.11`
89
+ - `beautifulsoup4==4.12.3`
90
+ - `numpy==2.2.0`
91
+ - `tqdm==4.67.1`
92
+ - `playwright>=1.41.0`
93
+ - `asyncio>=3.4.3`
94
+
95
+ ### Development Dependencies
96
+
97
+ - `pytest==8.3.4`
98
+ - `pytest-mockito==0.0.4`
99
+ - `black==24.2.0`
100
+ - `isort==5.13.0`
101
+ - `flake8==7.0.0`
102
+
103
+ ## πŸ—οΈ Project Structure
104
+
105
+
106
+ ```
107
+ crawlgpt/
108
+ β”œβ”€β”€ src/
109
+ β”‚ └── crawlgpt/
110
+ β”‚ β”œβ”€β”€ core/
111
+ β”‚ β”‚ β”œβ”€β”€ DatabaseHandler.py
112
+ β”‚ β”‚ β”œβ”€β”€ LLMBasedCrawler.py
113
+ β”‚ β”‚ └── SummaryGenerator.py
114
+ β”‚ β”œβ”€β”€ ui/
115
+ β”‚ β”‚ β”œβ”€β”€ chat_app.py
116
+ β”‚ β”‚ └── chat_ui.py
117
+ β”‚ └── utils/
118
+ β”‚ β”œβ”€β”€ content_validator.py
119
+ β”‚ β”œβ”€β”€ data_manager.py
120
+ β”‚ β”œβ”€β”€ helper_functions.py
121
+ β”‚ β”œβ”€β”€ monitoring.py
122
+ β”‚ └── progress.py
123
+ β”œβ”€β”€ tests/
124
+ β”‚ └── test_core/
125
+ β”‚ β”œβ”€β”€ test_database_handler.py
126
+ β”‚ β”œβ”€β”€ test_integration.py
127
+ β”‚ β”œβ”€β”€ test_llm_based_crawler.py
128
+ β”‚ └── test_summary_generator.py
129
+ β”œβ”€β”€ .gitignore
130
+ β”œβ”€β”€ LICENSE
131
+ β”œβ”€β”€ README.md
132
+ β”œβ”€β”€ Docs
133
+ β”œβ”€β”€ pyproject.toml
134
+ β”œβ”€β”€ pytest.ini
135
+ └── setup_env.py
136
+ ```
137
+
138
+ ## πŸ§ͺ Testing
139
+
140
+ Run all tests
141
+ ```
142
+ python -m pytest
143
+ ```
144
+ _The tests include unit tests for core functionality and integration tests for end-to-end workflows._
145
+
146
+ ## πŸ“ License
147
+
148
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
149
+
150
+ ## πŸ”— Links
151
+
152
+ - [Bug Tracker](https://github.com/Jatin-Mehra119/crawlgpt/issues)
153
+ - [Documentation](https://github.com/Jatin-Mehra119/crawlgpt/wiki)
154
+ - [Source Code](https://github.com/Jatin-Mehra119/crawlgpt)
155
+
156
+ ## 🧑 Acknowledgments
157
+
158
+ - Inspired by the potential of GPT models for intelligent content processing.
159
+ - Special thanks to the creators of Crawl4ai, Groq, FAISS, and Playwright for their powerful tools.
160
+
161
+ ## πŸ‘¨β€πŸ’» Author
162
+
163
+ - Jatin Mehra ([email protected])
164
+
165
+ ## 🀝 Contributing
166
+
167
+ Contributions are welcome! Please feel free to submit a Pull Request. For major changes, open an issue first to discuss your proposal.
168
+
169
+ 1. Fork the Project.
170
+ 2. Create your Feature Branch:
171
+ ```
172
+ git checkout -b feature/AmazingFeature`
173
+ ```
174
+ 3. Commit your Changes:
175
+ ```
176
+ git commit -m 'Add some AmazingFeature
177
+ ```
178
+ 4. Push to the Branch:
179
+ ```
180
+ git push origin feature/AmazingFeature
181
+ ```
182
+ 5. Open a Pull Request.