Muhammed Essam Claude commited on
Commit
3f28293
Β·
1 Parent(s): 576583f

Fix diagrams: Replace Mermaid with ASCII flowcharts

Browse files

- Replace non-rendering Mermaid diagrams with emoji ASCII art
- Use box-drawing characters and emojis for clear visualization
- All 4 tabs now have properly rendering flowcharts
- Maintains visual clarity while ensuring compatibility

Flowcharts now show:
- Tab 1: Dual-path name extraction + semantic search
- Tab 2: Voice pipeline with language detection
- Tab 3: Contact search with fuzzy matching
- Tab 4: Complete end-to-end voice contact search

πŸ€– Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

Files changed (1) hide show
  1. app.py +74 -39
app.py CHANGED
@@ -259,14 +259,19 @@ def create_demo():
259
  gr.Markdown("""
260
  ### πŸ” How It Works
261
 
262
- ```mermaid
263
- graph TD
264
- A[Your Text Query] --> B[Name Extraction<br/>GLiNER Model]
265
- A --> C[Semantic Search<br/>MiniLM Embeddings]
266
- B --> D[Extract Person Names]
267
- C --> E[Find Matching Divisions]
268
- D --> F[Show Results]
269
- E --> F
 
 
 
 
 
270
  ```
271
 
272
  **Models Used:**
@@ -307,16 +312,26 @@ def create_demo():
307
  gr.Markdown("""
308
  ### 🎀 How It Works
309
 
310
- ```mermaid
311
- graph TD
312
- A[πŸŽ™οΈ Voice Input] --> B[Whisper Base<br/>Speech-to-Text]
313
- B --> C[Auto Language<br/>Detection]
314
- C --> D{English?}
315
- D -->|No| E[Translate to<br/>English]
316
- D -->|Yes| F[Name Extraction<br/>GLiNER]
317
- E --> F
318
- F --> G[Semantic Search<br/>MiniLM]
319
- G --> H[πŸ“Š Results]
 
 
 
 
 
 
 
 
 
 
320
  ```
321
 
322
  **Models Used:**
@@ -358,16 +373,24 @@ def create_demo():
358
  gr.Markdown("""
359
  ### πŸ‘₯ How It Works
360
 
361
- ```mermaid
362
- graph TD
363
- A[Text Query] --> B[Name Extraction<br/>GLiNER]
364
- A --> C[Division Matching<br/>MiniLM]
365
- B --> D[Extract Names]
366
- C --> E[Find Divisions]
367
- D --> F[Search 500<br/>Contacts]
368
- E --> F
369
- F --> G[Fuzzy Matching<br/>+ Scoring]
370
- G --> H[Ranked Results<br/>by Confidence]
 
 
 
 
 
 
 
 
371
  ```
372
 
373
  **Models Used:**
@@ -416,17 +439,29 @@ def create_demo():
416
  gr.Markdown("""
417
  ### πŸŽ™οΈ How It Works
418
 
419
- ```mermaid
420
- graph TD
421
- A[🎀 Voice] --> B[Whisper<br/>Transcribe]
422
- B --> C{Language?}
423
- C -->|Arabic/Other| D[Translate to<br/>English]
424
- C -->|English| E[GLiNER<br/>Extract Names]
425
- D --> E
426
- E --> F[MiniLM<br/>Match Divisions]
427
- F --> G[Search 500<br/>Contacts]
428
- G --> H[Fuzzy Match<br/>+ Score]
429
- H --> I[πŸ“‹ Ranked<br/>Results]
 
 
 
 
 
 
 
 
 
 
 
 
430
  ```
431
 
432
  **Full AI Pipeline:**
 
259
  gr.Markdown("""
260
  ### πŸ” How It Works
261
 
262
+ ```
263
+ πŸ“ Your Text Query
264
+ ↓
265
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
266
+ ↓ ↓
267
+ πŸ‘€ GLiNER 🧠 MiniLM
268
+ Extract Names Embeddings
269
+ ↓ ↓
270
+ Person Names Divisions
271
+ ↓ ↓
272
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
273
+ ↓
274
+ πŸ“Š Show Results
275
  ```
276
 
277
  **Models Used:**
 
312
  gr.Markdown("""
313
  ### 🎀 How It Works
314
 
315
+ ```
316
+ πŸŽ™οΈ Voice Input
317
+ ↓
318
+ 🎧 Whisper Base
319
+ (Speech-to-Text)
320
+ ↓
321
+ 🌍 Auto Language Detection
322
+ ↓
323
+ β”Œβ”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”
324
+ ↓ ↓
325
+ English? Other?
326
+ ↓ ↓
327
+ ↓ 🌐 Translate
328
+ β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜
329
+ ↓
330
+ πŸ‘€ GLiNER Extract Names
331
+ ↓
332
+ 🧠 MiniLM Semantic Search
333
+ ↓
334
+ πŸ“Š Ranked Results
335
  ```
336
 
337
  **Models Used:**
 
373
  gr.Markdown("""
374
  ### πŸ‘₯ How It Works
375
 
376
+ ```
377
+ πŸ“ Text Query
378
+ ↓
379
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
380
+ ↓ ↓
381
+ πŸ‘€ GLiNER 🧠 MiniLM
382
+ Extract Names Match Divs
383
+ ↓ ↓
384
+ Person Names Divisions
385
+ ↓ ↓
386
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
387
+ ↓
388
+ πŸ” Search 500 Contacts
389
+ ↓
390
+ πŸ“Š Fuzzy Match + Score
391
+ ↓
392
+ ⭐ Ranked Results
393
+ (by confidence score)
394
  ```
395
 
396
  **Models Used:**
 
439
  gr.Markdown("""
440
  ### πŸŽ™οΈ How It Works
441
 
442
+ ```
443
+ πŸŽ™οΈ Voice Input
444
+ ↓
445
+ 🎧 Whisper Transcribe
446
+ ↓
447
+ 🌍 Language Detection
448
+ ↓
449
+ β”Œβ”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”
450
+ ↓ ↓
451
+ English? Arabic/Other?
452
+ ↓ ↓
453
+ ↓ 🌐 Translate
454
+ β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜
455
+ ↓
456
+ πŸ‘€ GLiNER Extract Names
457
+ ↓
458
+ 🧠 MiniLM Match Divisions
459
+ ↓
460
+ πŸ” Search 500 Contacts
461
+ ↓
462
+ πŸ“Š Fuzzy Match + Score
463
+ ↓
464
+ ⭐ Ranked Results
465
  ```
466
 
467
  **Full AI Pipeline:**