File size: 2,021 Bytes
d7b6953
 
 
 
 
 
 
 
 
 
44198e0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d7b6953
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
---
license: mit
title: crawling rag
sdk: gradio
emoji: πŸ‘
colorFrom: gray
colorTo: purple
short_description: a rag that can crawle website
sdk_version: 5.7.1
---
# πŸ” Intelligent Web Search Engine

An advanced AI-powered search engine that provides deep understanding of web content, code analysis, and intelligent insights.

## 🌟 Features

- Multi-model AI analysis
- Semantic search and caching
- Automatic insights generation
- Smart follow-up questions
- Code-aware analysis
- Related searches

## πŸš€ Deployment to Hugging Face Spaces

1. Create a new Space:
   - Go to [huggingface.co/spaces](https://huggingface.co/spaces)
   - Click "Create new Space"
   - Choose "Gradio" as the SDK
   - Select "CPU" as the hardware
   - Name your space (e.g., "intelligent-web-search")

2. Upload Files:
   - Upload all files from the `aiws` directory
   - Make sure to include:
     - `app.py`
     - `search_engine.py`
     - `requirements.txt`
     - `packages.txt`

3. Space Settings:
   - Go to the "Settings" tab
   - Under "Repository secrets", add any required API keys
   - Under "Variables", set:
     ```
     PYTHON_PACKAGES_PATH=/home/user/.local/lib/python3.9/site-packages
     ```

4. The space will automatically build and deploy your app

## πŸ“¦ Local Development

1. Clone the repository:
```bash
git clone [your-repo-url]
cd aiws
```

2. Install dependencies:
```bash
pip install -r requirements.txt
```

3. Run the app:
```bash
python app.py
```

## πŸ”§ Configuration

The search engine uses several AI models:
- Summarization: facebook/bart-base
- Code Understanding: Salesforce/codet5-small
- General QA: google/flan-t5-base
- Embeddings: sentence-transformers/all-MiniLM-L6-v2

## πŸ“ Usage

1. Enter your search query
2. Adjust the maximum number of results (1-20)
3. Click "Search"
4. View results including:
   - Key insights
   - Follow-up questions
   - Detailed analysis
   - Related searches

## 🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.