How joodshatnawi/rawi works
Rawi AI is a Streamlit tourist guide whose main journey runs from image upload through landmark recognition and tour generation to a results page with story, audio, facts, and a map; visitors can then ask landmark-specific questions. Chat rewrites questions, retrieves local indexed knowledge, and generates grounded answers. The graph also preserves multilingual content, cached stories, and the documented visitor-information features. Some subsystems are documented but their implementation was not sampled, so their links are limited to README evidence.
Main entry points: model_rawi.py Answer Generation · home_page.py Image Intake · result_page.py Tour Results · app.py App Router
Components 20
Visitor Interface
- App Router
app.py - Image Intake
home_page.py - Tour Results
result_page.py - Chat Interface
chat_page.py
Landmark Tour
- Landmark Detection
model_rawi.py - Story Generation
model_rawi.py - Audio Narration
model_rawi.py - Landmark Information
data/facts.json - Landmark Map
result_page.py
Rawi Chat
- Query Rewriting
model_rawi.py - Knowledge Retrieval
rag.py - Answer Generation
model_rawi.py
Tourism Content
- Indexed Knowledge
data/knowledge.json - Story Cache
stories_cache.json - Story Prompts
prompts/story_generation.md - Answer Prompts
prompts/answer_generation.md - Rewrite Prompts
prompts/query_rewriting.md
Other components
- Visitor
- Groq Model API
- TTS Service
Connections 24
- Visitor → Image Intake: uploads image
README.md - App Router → Image Intake: routes home
app.py - App Router → Tour Results: routes results
app.py - App Router → Chat Interface: routes chat
app.py - Image Intake → Landmark Detection: analyzes image
home_page.py - Landmark Detection → Story Generation: requests story
model_rawi.py - Landmark Detection → Landmark Information: loads facts
- Story Generation → Story Cache: reads or writes
model_rawi.py - Story Generation → Story Prompts: uses prompts
README.md - Story Generation → Groq Model API: generates story
model_rawi.py - Landmark Detection → Audio Narration: creates narration
model_rawi.py - Audio Narration → TTS Service: synthesizes speech
README.md - Image Intake → Tour Results: stores tour result
home_page.py - Tour Results → Landmark Map: renders location
result_page.py - Visitor → Chat Interface: asks question
README.md - Chat Interface → Answer Generation: requests answer
chat_page.py - Answer Generation → Query Rewriting: rewrites question
README.md - Query Rewriting → Rewrite Prompts: uses prompts
README.md - Query Rewriting → Groq Model API: rewrites query
model_rawi.py - Answer Generation → Knowledge Retrieval: requests context
model_rawi.py - Knowledge Retrieval → Indexed Knowledge: loads indexed chunks
- Answer Generation → Answer Prompts: uses prompts
README.md - Answer Generation → Groq Model API: generates answer
model_rawi.py - Tour Results → Landmark Information: shows visitor facts