Spaces:
Running
Running
Update README.md
Browse files
README.md
CHANGED
@@ -1,226 +1,92 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
- **Contact Form**: Direct email integration with validation
|
13 |
-
|
14 |
-
### RAGtim Bot - AI Assistant
|
15 |
-
- **Multiple Backend Options**: Choose from Hugging Face Space, Backend Server, or Netlify Functions
|
16 |
-
- **Advanced Search**: Hybrid semantic + keyword search for accurate responses
|
17 |
-
- **Comprehensive Knowledge**: Covers all aspects of Raktim's expertise
|
18 |
-
- **Real-time Chat**: Instant responses with conversation history
|
19 |
-
- **Performance Optimized**: Caching and efficient processing
|
20 |
-
|
21 |
-
## π RAGtim Bot Deployment Options
|
22 |
-
|
23 |
-
### Option 1: Hugging Face Space (Recommended) π€
|
24 |
-
**Pros**: Free GPU acceleration, no API keys needed, automatic scaling
|
25 |
-
**Best for**: Public deployment, maximum performance
|
26 |
-
|
27 |
-
```bash
|
28 |
-
# Set environment variable
|
29 |
-
VITE_USE_HUGGING_FACE=true
|
30 |
-
```
|
31 |
-
|
32 |
-
**Live Demo**: [RAGtim Bot on Hugging Face](https://huggingface.co/spaces/raktimhugging/ragtim-bot)
|
33 |
-
|
34 |
-
### Option 2: Backend Server π₯οΈ
|
35 |
-
**Pros**: Full control, local processing, custom configurations
|
36 |
-
**Best for**: Development, private deployments
|
37 |
-
|
38 |
-
```bash
|
39 |
-
# Set environment variables
|
40 |
-
VITE_USE_BACKEND=true
|
41 |
-
VITE_BACKEND_URL=http://localhost:3001
|
42 |
-
VITE_DEEPSEEK_API_KEY=your_api_key
|
43 |
-
|
44 |
-
# Start backend server
|
45 |
-
cd server
|
46 |
-
npm install
|
47 |
-
npm run dev
|
48 |
-
|
49 |
-
# Start frontend
|
50 |
-
npm run dev
|
51 |
-
```
|
52 |
-
|
53 |
-
### Option 3: Netlify Functions β‘
|
54 |
-
**Pros**: Serverless, automatic scaling, integrated with Netlify
|
55 |
-
**Best for**: Simple deployments, cost-effective
|
56 |
-
|
57 |
-
```bash
|
58 |
-
# Set environment variable
|
59 |
-
VITE_DEEPSEEK_API_KEY=your_api_key
|
60 |
-
# (VITE_USE_HUGGING_FACE and VITE_USE_BACKEND should be false or unset)
|
61 |
-
```
|
62 |
-
|
63 |
-
## π οΈ Quick Start
|
64 |
-
|
65 |
-
### 1. Clone and Install
|
66 |
-
```bash
|
67 |
-
git clone <repository-url>
|
68 |
-
cd portfolio
|
69 |
-
npm install
|
70 |
-
```
|
71 |
-
|
72 |
-
### 2. Choose Your RAG Backend
|
73 |
-
|
74 |
-
#### For Hugging Face Space (Easiest):
|
75 |
-
```bash
|
76 |
-
echo "VITE_USE_HUGGING_FACE=true" > .env
|
77 |
-
npm run dev
|
78 |
-
```
|
79 |
-
|
80 |
-
#### For Backend Server:
|
81 |
-
```bash
|
82 |
-
echo "VITE_USE_BACKEND=true" > .env
|
83 |
-
echo "VITE_BACKEND_URL=http://localhost:3001" >> .env
|
84 |
-
echo "VITE_DEEPSEEK_API_KEY=your_api_key" >> .env
|
85 |
|
86 |
-
#
|
87 |
-
npm run dev:full
|
88 |
-
```
|
89 |
|
90 |
-
|
91 |
-
```bash
|
92 |
-
echo "VITE_DEEPSEEK_API_KEY=your_api_key" > .env
|
93 |
-
npm run dev
|
94 |
-
```
|
95 |
|
96 |
-
|
97 |
-
Visit `http://localhost:5173` to see the portfolio with RAGtim Bot!
|
98 |
-
|
99 |
-
## π RAGtim Bot Comparison
|
100 |
-
|
101 |
-
| Feature | Hugging Face | Backend Server | Netlify Functions |
|
102 |
-
|---------|-------------|----------------|-------------------|
|
103 |
-
| **Setup Complexity** | β Easy | βββ Complex | ββ Medium |
|
104 |
-
| **Performance** | βββ Excellent | βββ Excellent | ββ Good |
|
105 |
-
| **Cost** | π Free | π° Server costs | π° Function costs |
|
106 |
-
| **Scalability** | βββ Auto | ββ Manual | βββ Auto |
|
107 |
-
| **Customization** | ββ Limited | βββ Full | ββ Medium |
|
108 |
-
| **API Key Required** | β No | β
Yes | β
Yes |
|
109 |
-
|
110 |
-
## π― RAGtim Bot Capabilities
|
111 |
-
|
112 |
-
### What You Can Ask:
|
113 |
-
- **Research**: "What is Raktim's research about?"
|
114 |
-
- **Publications**: "Tell me about BioFusionNet"
|
115 |
-
- **Skills**: "What programming languages does he know?"
|
116 |
-
- **Experience**: "Where has he worked?"
|
117 |
-
- **Education**: "What degrees does he have?"
|
118 |
-
- **Statistics**: "What statistical methods does he use?"
|
119 |
-
- **Contact**: "How can I reach Raktim?"
|
120 |
-
|
121 |
-
### Technical Features:
|
122 |
-
- **Semantic Search**: Understanding context and meaning
|
123 |
-
- **Keyword Matching**: Exact term matching for precision
|
124 |
-
- **Conversation Memory**: Maintains chat history
|
125 |
-
- **Response Caching**: Fast repeated queries
|
126 |
-
- **Error Handling**: Graceful fallbacks and error messages
|
127 |
-
|
128 |
-
## π§ Development
|
129 |
-
|
130 |
-
### Frontend Development
|
131 |
-
```bash
|
132 |
-
npm run dev # Start development server
|
133 |
-
npm run build # Build for production
|
134 |
-
npm run preview # Preview production build
|
135 |
-
```
|
136 |
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
143 |
```
|
144 |
|
145 |
-
###
|
146 |
-
```
|
147 |
-
|
148 |
-
|
149 |
```
|
150 |
|
151 |
-
##
|
152 |
-
|
153 |
-
### Deploy to Netlify (with Hugging Face)
|
154 |
-
1. Set `VITE_USE_HUGGING_FACE=true` in Netlify environment variables
|
155 |
-
2. Deploy normally - no additional configuration needed!
|
156 |
-
|
157 |
-
### Deploy to Netlify (with Functions)
|
158 |
-
1. Set `VITE_DEEPSEEK_API_KEY` in Netlify environment variables
|
159 |
-
2. Netlify Functions will be automatically deployed
|
160 |
-
|
161 |
-
### Deploy Backend Server
|
162 |
-
Choose from:
|
163 |
-
- **Railway**: Easy deployment with automatic scaling
|
164 |
-
- **Render**: Free tier available, good for development
|
165 |
-
- **DigitalOcean**: Full control, various pricing options
|
166 |
-
- **AWS/GCP**: Enterprise-grade with advanced features
|
167 |
-
|
168 |
-
## π± Mobile Experience
|
169 |
|
170 |
-
- **
|
171 |
-
- **
|
172 |
-
- **
|
173 |
-
- **
|
|
|
174 |
|
175 |
-
##
|
176 |
|
177 |
-
|
178 |
-
-
|
179 |
-
-
|
180 |
-
-
|
|
|
181 |
|
182 |
-
|
183 |
-
- Easy content updates via markdown files
|
184 |
-
- Modular component structure
|
185 |
-
- Configurable sections and features
|
186 |
|
187 |
-
|
188 |
-
|
189 |
-
- **
|
190 |
-
- **
|
191 |
-
- **Input Validation**: Prevents malicious inputs
|
192 |
-
- **Rate Limiting**: Prevents abuse and spam
|
193 |
-
|
194 |
-
## π Performance
|
195 |
-
|
196 |
-
- **Lighthouse Score**: 95+ across all metrics
|
197 |
-
- **Fast Loading**: Optimized bundle sizes
|
198 |
-
- **Efficient Caching**: Smart caching strategies
|
199 |
-
- **CDN Ready**: Optimized for global delivery
|
200 |
-
|
201 |
-
## π€ Contributing
|
202 |
-
|
203 |
-
1. Fork the repository
|
204 |
-
2. Create a feature branch
|
205 |
-
3. Make your changes
|
206 |
-
4. Test thoroughly
|
207 |
-
5. Submit a pull request
|
208 |
-
|
209 |
-
## π License
|
210 |
-
|
211 |
-
MIT License - see LICENSE file for details
|
212 |
-
|
213 |
-
## π Acknowledgments
|
214 |
-
|
215 |
-
- **Hugging Face**: For providing free GPU-accelerated AI hosting
|
216 |
-
- **OpenAI/DeepSeek**: For powerful language models
|
217 |
-
- **Netlify**: For seamless deployment and functions
|
218 |
-
- **React/Vite**: For the excellent development experience
|
219 |
-
- **Tailwind CSS**: For beautiful, responsive styling
|
220 |
|
221 |
---
|
222 |
|
223 |
-
**
|
224 |
-
**
|
225 |
-
|
226 |
-
Built with β€οΈ by Raktim Mondol
|
|
|
1 |
+
---
|
2 |
+
title: RAGtim Bot - Raktim's AI Assistant
|
3 |
+
emoji: π€
|
4 |
+
colorFrom: green
|
5 |
+
colorTo: blue
|
6 |
+
sdk: gradio
|
7 |
+
sdk_version: "4.15.0"
|
8 |
+
app_file: app.py
|
9 |
+
pinned: false
|
10 |
+
license: mit
|
11 |
+
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
|
13 |
+
# π€ RAGtim Bot - Raktim's AI Assistant
|
|
|
|
|
14 |
|
15 |
+
An intelligent AI assistant powered by Hugging Face Transformers that answers questions about Raktim Mondol's research, expertise, and professional background.
|
|
|
|
|
|
|
|
|
16 |
|
17 |
+
## π Features
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
|
19 |
+
- **Complete Markdown Knowledge Base**: Loads all portfolio content from markdown files
|
20 |
+
- **GPU-Accelerated Search**: Uses `sentence-transformers/all-MiniLM-L6-v2` for semantic similarity
|
21 |
+
- **Comprehensive Coverage**: Research, publications, skills, experience, education, statistics
|
22 |
+
- **API Endpoints**: Direct access to search and statistics
|
23 |
+
- **Real-time Chat**: Interactive conversational interface
|
24 |
+
|
25 |
+
## π Knowledge Base
|
26 |
+
|
27 |
+
This Space loads comprehensive information from:
|
28 |
+
|
29 |
+
- **about.md** - Personal information, contact details, professional summary
|
30 |
+
- **research_details.md** - Detailed research projects, methodologies, current work
|
31 |
+
- **publications_detailed.md** - Complete publication details, technical contributions
|
32 |
+
- **skills_expertise.md** - Comprehensive technical skills, tools, frameworks
|
33 |
+
- **experience_detailed.md** - Professional experience, teaching, research roles
|
34 |
+
- **statistics.md** - Statistical methods, biostatistics expertise, methodologies
|
35 |
+
|
36 |
+
## π What You Can Ask
|
37 |
+
|
38 |
+
- Research projects and methodologies
|
39 |
+
- Publications with technical details
|
40 |
+
- Technical skills and programming expertise
|
41 |
+
- Educational background and achievements
|
42 |
+
- Professional experience and teaching roles
|
43 |
+
- Statistical methods and biostatistics applications
|
44 |
+
- Awards, recognition, and professional development
|
45 |
+
- Contact information and collaboration opportunities
|
46 |
+
|
47 |
+
## π API Usage
|
48 |
+
|
49 |
+
### Search API
|
50 |
+
```python
|
51 |
+
import requests
|
52 |
+
|
53 |
+
response = requests.post(
|
54 |
+
"https://raktimhugging-ragtim-bot.hf.space/api/search",
|
55 |
+
json={"query": "What is Raktim's research about?", "top_k": 5}
|
56 |
+
)
|
57 |
+
results = response.json()
|
58 |
```
|
59 |
|
60 |
+
### Stats API
|
61 |
+
```python
|
62 |
+
response = requests.get("https://raktimhugging-ragtim-bot.hf.space/api/stats")
|
63 |
+
stats = response.json()
|
64 |
```
|
65 |
|
66 |
+
## π§ Technical Details
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
|
68 |
+
- **Model**: sentence-transformers/all-MiniLM-L6-v2
|
69 |
+
- **Embedding Dimension**: 384
|
70 |
+
- **Search Type**: Semantic similarity with relevance scoring
|
71 |
+
- **Knowledge Sections**: 50+ sections across 6 markdown files
|
72 |
+
- **GPU Acceleration**: Automatic CUDA detection and usage
|
73 |
|
74 |
+
## π Integration
|
75 |
|
76 |
+
This Space can be integrated with:
|
77 |
+
- Portfolio websites for intelligent chat assistance
|
78 |
+
- Research collaboration platforms
|
79 |
+
- Academic networking tools
|
80 |
+
- Professional inquiry systems
|
81 |
|
82 |
+
## π Contact
|
|
|
|
|
|
|
83 |
|
84 |
+
For questions about Raktim Mondol or collaboration opportunities:
|
85 |
+
- **Email**: [email protected]
|
86 |
+
- **Portfolio**: [mondol.me](https://mondol.me)
|
87 |
+
- **Institution**: UNSW Sydney, School of Computer Science & Engineering
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
|
89 |
---
|
90 |
|
91 |
+
**Built with**: Gradio, Hugging Face Transformers, PyTorch
|
92 |
+
**Powered by**: GPU-accelerated semantic search and comprehensive markdown knowledge base
|
|
|
|