Spaces:
Sleeping
Sleeping
A newer version of the Gradio SDK is available: 6.11.0
metadata
title: RAG System with Qwen 1.5
emoji: 🤖
colorFrom: blue
colorTo: purple
sdk: gradio
sdk_version: 4.26.0
app_file: app.py
pinned: false
license: apache-2.0
RAG System with Qwen 1.5
Upload your JSON knowledge base and ask questions using AI!
How to Use
- Go to the "Load Knowledge Base" tab
- Upload your JSON file
- Click "Load Knowledge Base"
- Go to "Ask Questions" tab
- Type your question and press Enter!
Example JSON Format
[
{
"title": "AI Basics",
"content": "Artificial Intelligence is the simulation of human intelligence in machines..."
},
{
"title": "Machine Learning",
"content": "Machine Learning is a subset of AI that focuses on algorithms..."
}
]
4. Click **"Commit changes"**
---
## Step 4: Wait for Your Space to Build
### 4.1 Building Process
1. After uploading files, your Space will automatically start building
2. You'll see "Building..." status at the top of your Space
3. This process takes **5-15 minutes** (be patient!)
4. You can click on "Logs" to see what's happening
### 4.2 What's Happening During Build
- Hugging Face is creating a container with your code
- Installing all the Python packages from requirements.txt
- Downloading the AI models (Qwen 1.5 and sentence transformer)
- Starting the Gradio web interface
### 4.3 Build Success
- Status will change from "Building..." to "Running"
- You'll see your web interface appear
- If build fails, check the "Logs" tab for error messages
---
## Step 5: Test Your RAG System
### 5.1 Create a Test JSON File
On your computer, create a file called `test_knowledge.json`:
```json
[
{
"id": 1,
"title": "Artificial Intelligence",
"content": "Artificial Intelligence (AI) is the simulation of human intelligence in machines that are programmed to think like humans and mimic their actions. The term may also be applied to any machine that exhibits traits associated with a human mind such as learning and problem-solving.",
"category": "Technology",
"tags": ["AI", "technology", "intelligence"]
},
{
"id": 2,
"title": "Machine Learning",
"content": "Machine Learning (ML) is a type of artificial intelligence that allows software applications to become more accurate at predicting outcomes without being explicitly programmed to do so. Machine learning algorithms use historical data as input to predict new output values.",
"category": "Technology",
"tags": ["ML", "AI", "algorithms", "data"]
},
{
"id": 3,
"title": "Deep Learning",
"content": "Deep Learning is a subset of machine learning which is essentially a neural network with three or more layers. These neural networks attempt to simulate the behavior of the human brain—albeit far from matching its ability—allowing it to 'learn' from large amounts of data.",
"category": "Technology",
"tags": ["deep learning", "neural networks", "AI"]
}
]