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_stavam_config = { | |
| "name": "sri_stavam", | |
| "title": "Sri Stavam", | |
| "banner_url": convert_drive_url_to_direct( | |
| "https://drive.google.com/file/d/1kWJBekDBijMqXFXLkgjMp3hS19gH5PFT/view?usp=drive_link" | |
| ), | |
| "category": ScriptureCategoryConstants.STOTRAM, | |
| "output_dir": "./output/sri_stavam", | |
| "collection_name": "sri_stavam", | |
| "unit": "slokam", | |
| "unit_field": "sloka_number", | |
| "field_mapping": { | |
| "text": "sanskrit", | |
| "title": lambda doc: f"Verse {doc.get('sloka_number','')}", | |
| "unit_index": "sloka_number", | |
| "chapter_name": "chapter", | |
| "transliteration": "transliteration", | |
| "word_by_word_native": "meaning_short", | |
| "translation": "commentary", | |
| "author": lambda doc: ( | |
| "Sri Koorathazhwan" if 1 <= doc.get("sloka_number", 0) <= 11 else "-" | |
| ), | |
| "relative_path": lambda doc: f"॥ श्री:स्तव: ॥ {doc.get("sloka_number",'')}", | |
| }, | |
| "metadata_fields": [ | |
| { | |
| "name": "sloka_number", | |
| "label": "Slokam Number", | |
| "datatype": "int", | |
| "description": "The index of the sloka or verse", | |
| "show_as_filter": True, | |
| "is_unique": True, | |
| }, | |
| { | |
| "name": "sanskrit", | |
| "label": "Lyrics in sanskrit", | |
| "datatype": "str", | |
| "description": "Verse in sanskrit", | |
| "show_as_filter": True, | |
| }, | |
| { | |
| "name": "transliteration", | |
| "label": "English Transliteration", | |
| "datatype": "str", | |
| "description": "Verse transliterated to English", | |
| "show_as_filter": True, | |
| }, | |
| { | |
| "name": "meaning_short", | |
| "label": "Short meaning", | |
| "datatype": "str", | |
| "description": "A short meaning of the sanskrit verse in English.", | |
| "show_as_filter": True, | |
| }, | |
| ], | |
| "pdf_path": "./data/sri_stavam.pdf", | |
| "source": "https://www.sadagopan.org/ebook/pdf/Sri%20Stavam.pdf", | |
| "language": "san+eng", | |
| "example_labels": ["Recite a sloka", "Commentary", "Role of Sridevi"], | |
| "examples": [ | |
| "Recite the 1st sloka from Sri Stavam", | |
| "Show detailed commentary for sloka 2 from Sri Stavam", | |
| "What is the role of Sri Devi in the universe according to the Sri Stavam?", | |
| ], | |
| "llm_hints": [ | |
| "if the user asks for nth sloka, do a metadata search on the `verse` field." | |
| ], | |
| "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": "Sadagopan.org", | |
| "url": "https://www.sadagopan.org/ebook/pdf/Sri%20Stavam.pdf", | |
| "role": "Data provider", | |
| "photo_url": "https://www.sadagopan.org/assets/front/images/img1.png", | |
| } | |
| ], | |
| "audio": [ | |
| { | |
| "name": "Srirangam Sri Vasudevan Srinivasachariar", | |
| "url": "https://www.youtube.com/@akivasudev", | |
| "role": "Recitation audio provider", | |
| "context": [{"start": 1, "end": 10}], | |
| "photo_url": "https://drive.google.com/uc?export=download&id=1HB1Nr39j2-55rIeOK_wYNbZZndcGZIaf", | |
| }, | |
| ], | |
| "video": [ | |
| { | |
| "name": "Sri Agaram Seshadri Vijayaraghavan", | |
| "url": "https://www.youtube.com/@jagadacharya2405", | |
| "role": "Upanyasam video provider", | |
| "context": [{"start": 1, "end": 10, "description": "Sri Stavam"}], | |
| "photo_url": "https://drive.google.com/uc?export=download&id=1sM9-BiYRbjABJeihk5q6E2Lc5gc0_72V", | |
| }, | |
| ], | |
| }, | |
| "audio_modes": {"recitation": "Recitation", "viruthan": "Virutham"}, | |
| } | |