Spaces:
Running
Running
File size: 4,138 Bytes
ec6e2b2 695466f ec6e2b2 9dfa5ae ec6e2b2 9dfa5ae ec6e2b2 9dfa5ae ec6e2b2 9dfa5ae ec6e2b2 9dfa5ae 0bdc135 ec6e2b2 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
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",
},
}
|