Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
| from modules.config.categories import ScriptureCategoryConstants | |
| from modules.google_drive.google_drive_utils import convert_drive_url_to_direct | |
| sri_vachana_bhushanam_config = { | |
| "name": "sri_vachana_bhushanam", | |
| "title": "Sri Vachana Bhushanam", | |
| "category": ScriptureCategoryConstants.GRANTHAM, | |
| "output_dir": "./output/sri_vachana_bhushanam", | |
| "collection_name": "sri_vachana_bhushanam", | |
| "collection_embedding_fn": "openai", | |
| "unit": "sutra", | |
| "unit_field": "_global_index", | |
| "chapter_order": lambda: { | |
| "taniyan": 1, | |
| "sutra": 2, | |
| }, | |
| "field_mapping": { | |
| "text": "sutra_text_ta", | |
| "unit_index": "verse", | |
| "translation": lambda doc: f"**Background**: \n{doc.get('story','')}\n\n **Simple Meaning**\n{doc.get('simple_en','')}", | |
| "word_by_word_native": "commentary", | |
| "chapter_name": lambda doc: ( | |
| f"{doc.get('chapter_name')}({doc.get('chapter_name_ta')})" | |
| ), | |
| "author": lambda doc: f"Pillai Lokachariar", | |
| "relative_path": lambda doc: ( | |
| f"{doc.get('chapter_name_ta')}:{doc.get('verse')} || {doc.get('_global_index')} ||" | |
| ), | |
| }, | |
| "metadata_fields": [ | |
| { | |
| "name": "chapter_name", | |
| "datatype": "str", | |
| "label": "Chapter Name", | |
| "description": "Name of the Chapter in English", | |
| "show_as_filter": True, | |
| "component": "dropdown", | |
| "lov": lambda: ["thaniyan", "sutra"], | |
| "is_unique": True, | |
| }, | |
| { | |
| "name": "chapter_name_ta", | |
| "datatype": "str", | |
| "label": "Chapter Name (Tamil)", | |
| "description": "Name of the Chapter in Tamil", | |
| "show_as_filter": True, | |
| "component": "dropdown", | |
| "lov": lambda: ["தனியன்", "சூத்திரம்"], | |
| "is_unique": True, | |
| }, | |
| { | |
| "name": "verse", | |
| "datatype": "int", | |
| "label": "Relative Sutra Number", | |
| "description": "Relative Sutra Number", | |
| "show_as_filter": True, | |
| "is_unique": True, | |
| }, | |
| { | |
| "name": "_global_index", | |
| "datatype": "int", | |
| "label": "Absolute Sutra Number", | |
| "description": "Absolute Sutra Number", | |
| "show_as_filter": True, | |
| "is_unique": True, | |
| }, | |
| { | |
| "name": "sutra_text_ta", | |
| "label": "Lyrics in tamil", | |
| "datatype": "str", | |
| "description": "The original sutra in tamil.", | |
| "show_as_filter": True, | |
| }, | |
| ], | |
| "pdf_path": "./data/sri_vachana_bhushanam.pdf", | |
| "source": "https://granthams.koyil.org", | |
| "language": "tam+eng", | |
| "example_labels": [ | |
| "Sri Vachana Bhushanam", | |
| ], | |
| "examples": [ | |
| "Show some sutras from Sri Vachana Bhushanam", | |
| ], | |
| "llm_hints": [], | |
| "credits": { | |
| "art": [ | |
| { | |
| "name": "Sri TNCN", | |
| "url": "https://www.linkedin.com/in/narashiman-chakravarthy-54326111/", | |
| "role": "Illustrator", | |
| "notes": "Original artwork used with permission", | |
| "photo_url": "https://drive.google.com/uc?export=download&id=1D4Vo-Mvkp1RdZR6whUkcjvNBIW1yHSUE", | |
| } | |
| ], | |
| "data": [ | |
| { | |
| "name": "koyil.org", | |
| "url": "https://granthams.koyil.org", | |
| "role": "Data provider", | |
| "photo_url": "https://secure.gravatar.com/avatar/27d6c78e7e79455a2692808455865bc46e6be90018cf66e5a00d731fc8e8d83f?s=50&d=mm&r=g", | |
| }, | |
| ], | |
| "audio": [ | |
| { | |
| "name": "Srirangam Sri Vasudevan Srinivasachariar", | |
| "url": "https://www.youtube.com/@akivasudev", | |
| "role": "Recitation audio provider", | |
| "photo_url": "https://drive.google.com/uc?export=download&id=1HB1Nr39j2-55rIeOK_wYNbZZndcGZIaf", | |
| }, | |
| ], | |
| "video": [], | |
| }, | |
| "audio_modes": { | |
| "recitation": "Recitation", | |
| }, | |
| } | |