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 | |
| gadhyathrayam_config = { | |
| "name": "gadhyathrayam", | |
| "title": "Gadhyathrayam", | |
| "banner_url": convert_drive_url_to_direct( | |
| "https://drive.google.com/file/d/1ZE6vQp3goWL-xrnDv8rWBbKQjGPHjqIh/view?usp=drive_link" | |
| ), | |
| "category": ScriptureCategoryConstants.SRI_SOOKTHI, | |
| "output_dir": "./outputs/gadhyathrayam", | |
| "collection_name": "gadhyathrayam", | |
| "collection_embedding_fn": "openai", | |
| "unit": "slokam", | |
| "unit_field": "_global_index", | |
| "field_mapping": { | |
| "text": "lyrics_sa", | |
| "chapter_name": "chapter_name", | |
| "unit_index": "_global_index", | |
| "relative_path": lambda doc: ( | |
| f"{doc.get('gadyam')} | " | |
| f"{'' if doc.get('chapter_name') == 'GADYAM' else doc.get('chapter_name')}" | |
| f"{doc.get('slokam_index')}" | |
| f"{'.' + str(doc.get('split_index')) if doc.get('split_index') and doc.get('split_index') > 1 else ''}" | |
| ), | |
| "author": lambda doc: "Sri Ramanuja", | |
| "reference_link": "source_url", | |
| }, | |
| "metadata_fields": [ | |
| { | |
| "name": "gadyam", | |
| "datatype": "str", | |
| "label": "Gadyam Name", | |
| "description": "Name of the Gadyam", | |
| "show_as_filter": True, | |
| "component": "dropdown", | |
| "lov": lambda: ["SARANAGATHI GADYAM", "SRIRANGA GADYAM", "VAIKUNTA GADYAM"], | |
| }, | |
| { | |
| "name": "chapter_name", | |
| "datatype": "str", | |
| "label": "Chapter Name", | |
| "description": "Chapter title", | |
| "show_as_filter": True, | |
| "component": "dropdown", | |
| "lov": lambda: ["GADYAM", "THANIYAN"], | |
| }, | |
| { | |
| "name": "_global_index", | |
| "datatype": "int", | |
| "label": "Global Index", | |
| "description": "Absolute verse index", | |
| "show_as_filter": True, | |
| "is_unique": True, | |
| }, | |
| { | |
| "name": "chapter_index", | |
| "datatype": "int", | |
| "label": "Chapter Index", | |
| "description": "Chapter index", | |
| }, | |
| { | |
| "name": "slokam_index", | |
| "datatype": "int", | |
| "label": "Verse Number (in chapter)", | |
| "description": "Sequential verse index inside the chapter", | |
| "show_as_filter": True, | |
| }, | |
| { | |
| "name": "split_index", | |
| "datatype": "int", | |
| "label": "Slokam Split Index", | |
| "description": "Sequential split index if a sloka is split", | |
| "show_as_filter": True, | |
| }, | |
| { | |
| "name": "lyrics_sa", | |
| "datatype": "str", | |
| "label": "Sanskrit Verse", | |
| "description": "Original verse text in Sanskrit", | |
| "show_as_filter": True, | |
| }, | |
| ], | |
| "pdf_path": "./data/gadhyathrayam.pdf", | |
| "source": "sanskritdocuments.org", | |
| "language": "san", | |
| "example_labels": [], | |
| "examples": [], | |
| "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": "sanskritdocuments.org", | |
| "url": "https://sanskritdocuments.org/doc_vishhnu/sharaNAgatigadyam.html", | |
| "role": "Data Provider", | |
| }, | |
| { | |
| "name": "sanskritdocuments.org", | |
| "url": "https://sanskritdocuments.org/doc_vishhnu/shrIrangagadyam.html", | |
| "role": "Data Provider", | |
| }, | |
| { | |
| "name": "sanskritdocuments.org", | |
| "url": "https://sanskritdocuments.org/doc_vishhnu/vaikuNThagadyam.html", | |
| "role": "Data Provider", | |
| }, | |
| ], | |
| "audio": [ | |
| { | |
| "name": "Sri Vasudevan Srinivasachariar Swamy(Srirangam)", | |
| "url": "https://www.youtube.com/@akivasudev", | |
| "role": "Recitation audio contributor", | |
| "context": [], | |
| "photo_url": "https://drive.google.com/uc?export=download&id=1HB1Nr39j2-55rIeOK_wYNbZZndcGZIaf", | |
| }, | |
| ], | |
| "video": [], | |
| }, | |
| "audio_modes": { | |
| "recitation": "Recitation", | |
| }, | |
| } | |