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 | |
| def fn_list_of_chapters(): | |
| return [f"Dashaka {idx}" for idx in range(1,101)] | |
| narayaneeyam_config = { | |
| "name": "narayaneeyam", | |
| "title": "Narayaneeyam", | |
| "category": ScriptureCategoryConstants.STOTRAM, | |
| "banner_url": convert_drive_url_to_direct( | |
| "https://drive.google.com/file/d/18hG71Ch7cqtlT_ZbFtAqlMPo59yFx3sO/view?usp=drive_link" | |
| ), | |
| "output_dir": "./output/narayaneeyam", | |
| "collection_name": "narayaneeyam", | |
| "collection_embedding_fn": "openai", | |
| "unit": "sloka", | |
| "unit_field": "_global_index", | |
| "field_mapping": { | |
| "text": "lyrics_sa", | |
| "unit_index": "relative_verse_index", | |
| "chapter_name": "chapter_name", | |
| "author": lambda doc: f" Sri Meppattur Narayana Bhattathiri", | |
| "word_by_word_native": "wbw_english", | |
| "translation": "translation", | |
| "relative_path": lambda doc: ( | |
| f"{doc.get('chapter_name')}:{doc.get('relative_verse_index')} || {doc.get('_global_index')} ||" | |
| ), | |
| }, | |
| "metadata_fields": [ | |
| { | |
| "name": "chapter_name", | |
| "datatype": "str", | |
| "label": "Chapter Name", | |
| "description": "Name of the Chapter in Sanskrit", | |
| "show_as_filter": True, | |
| "component": "dropdown", | |
| "lov": lambda: [x for x in fn_list_of_chapters()], | |
| "is_unique": True, | |
| }, | |
| { | |
| "name": "relative_verse_index", | |
| "datatype": "int", | |
| "label": "Relative Verse Number", | |
| "description": "Relative Verse Number", | |
| "show_as_filter": True, | |
| "is_unique": True, | |
| }, | |
| { | |
| "name": "_global_index", | |
| "datatype": "int", | |
| "label": "Absolute Verse Number", | |
| "description": "Absolute Verse Number", | |
| "show_as_filter": True, | |
| "is_unique": True, | |
| }, | |
| { | |
| "name": "lyrics_sa", | |
| "label": "Lyrics in Sanskrit", | |
| "datatype": "str", | |
| "description": "The original verse in Sanskrit.", | |
| "show_as_filter": True, | |
| }, | |
| ], | |
| "pdf_path": "./data/narayaneeyam.pdf", | |
| "source": "https://narayaneeyam-firststep.org/", | |
| "language": "san+eng", | |
| "example_labels": [ | |
| "Narayaneeyam", | |
| ], | |
| "examples": [ | |
| "Show some verses from Narayaneeyam", | |
| ], | |
| "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": "First Step", | |
| "url": "https://narayaneeyam-firststep.org/", | |
| "role": "Data provider", | |
| }, | |
| ], | |
| "audio": [ | |
| { | |
| "name": "Mrs. Seethalakshmi Ramaswami", | |
| "url": "https://sanskritdocuments.org/sites/completenarayaneeyam", | |
| "role": "Audio provider", | |
| }, | |
| ], | |
| "video": [], | |
| }, | |
| "audio_modes": { | |
| "recitation": "Recitation", | |
| }, | |
| } | |