Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files
README.md
CHANGED
|
@@ -48,6 +48,54 @@ Each logical component runs as a **separate FastAPI microservice**:
|
|
| 48 |
| **streamlit_ui** | Gemini-styled user interface |
|
| 49 |
|
| 50 |
This mirrors real production designs (scalable, modular, interchangeable components).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
|
| 52 |
### πΉ Explanations
|
| 53 |
|
|
@@ -196,3 +244,4 @@ L2 distance is used instead of cosine because:
|
|
| 196 |
- top matching sentences
|
| 197 |
- optional LLM explanation
|
| 198 |
|
|
|
|
|
|
| 48 |
| **streamlit_ui** | Gemini-styled user interface |
|
| 49 |
|
| 50 |
This mirrors real production designs (scalable, modular, interchangeable components).
|
| 51 |
+
User
|
| 52 |
+
β
|
| 53 |
+
β 1. enters query
|
| 54 |
+
βΌ
|
| 55 |
+
Streamlit UI
|
| 56 |
+
β
|
| 57 |
+
β 2. POST /search
|
| 58 |
+
βΌ
|
| 59 |
+
API Gateway
|
| 60 |
+
β
|
| 61 |
+
β 3. Embed query text
|
| 62 |
+
βΌ
|
| 63 |
+
Embed Service
|
| 64 |
+
β (cache hit? yes β return instantly)
|
| 65 |
+
β (cache miss? β compute embedding)
|
| 66 |
+
βΌ
|
| 67 |
+
API Gateway
|
| 68 |
+
β
|
| 69 |
+
β 4. Search FAISS index
|
| 70 |
+
βΌ
|
| 71 |
+
Search Service
|
| 72 |
+
β returns top-k doc IDs
|
| 73 |
+
βΌ
|
| 74 |
+
API Gateway
|
| 75 |
+
β
|
| 76 |
+
β 5. Fetch document content
|
| 77 |
+
βΌ
|
| 78 |
+
Doc Service
|
| 79 |
+
β returns full + clean text
|
| 80 |
+
βΌ
|
| 81 |
+
API Gateway
|
| 82 |
+
β
|
| 83 |
+
β 6. Generate explanation
|
| 84 |
+
βΌ
|
| 85 |
+
Explain Service
|
| 86 |
+
β - keyword overlap
|
| 87 |
+
β - semantic top sentences
|
| 88 |
+
β - Gemini LLM explanation
|
| 89 |
+
βΌ
|
| 90 |
+
API Gateway
|
| 91 |
+
β
|
| 92 |
+
β 7. Return final response
|
| 93 |
+
βΌ
|
| 94 |
+
Streamlit
|
| 95 |
+
β
|
| 96 |
+
βΌ
|
| 97 |
+
User sees ranked cards + explanations
|
| 98 |
+
|
| 99 |
|
| 100 |
### πΉ Explanations
|
| 101 |
|
|
|
|
| 244 |
- top matching sentences
|
| 245 |
- optional LLM explanation
|
| 246 |
|
| 247 |
+
|