sanatan_ai / modules /config /taitriya_upanishad.py
vikramvasudevan's picture
Upload folder using huggingface_hub
b72660d verified
from modules.config.categories import ScriptureCategoryConstants
from modules.google_drive.google_drive_utils import convert_drive_url_to_direct
from modules.scripture_helpers.taitriya_upanishad_helper import (
get_chapter_order_from_taitriya_upanishad,
get_taitriya_upanishad_chapters,
)
taitriya_upanishad_config = {
"name": "taitriya_upanishad",
"title": "Taitriya Upanishad",
"banner_url": convert_drive_url_to_direct(
"https://drive.google.com/file/d/1etSEGmzl06XgO2VFhBVSQK5u_1zbkqvb/view?usp=drive_link"
),
"category": ScriptureCategoryConstants.VEDAM,
"output_dir": "./output/taitriya_upanishad",
"collection_name": "taitriya_upanishad",
"collection_embedding_fn": "openai",
"unit": "verse",
"unit_field": "relative_verse_number",
"chapter_order": lambda: get_chapter_order_from_taitriya_upanishad(),
"field_mapping": {
"text": "sanskrit",
"unit_index": "relative_verse_number",
"transliteration": lambda doc: f"English: \n{doc.get('english')}\n\nதமிழ்: \n{doc.get('tamil')}\n\nతెలుగు: \n{doc.get('telugu')}\n\nಕನ್ನಡ: \n{doc.get('kannada')}",
# "chapter_name": "chapter_title",
"relative_path": lambda doc: f"॥ {doc.get('chapter_title')}{doc.get('relative_verse_number','')}",
},
"metadata_fields": [
{
"name": "chapter_title",
"datatype": "str",
"label": "Chapter Name",
"description": "Name of the Chapter",
"show_as_filter": True,
"component": "dropdown",
"lov": lambda: get_taitriya_upanishad_chapters(),
"is_unique": True,
},
{
"name": "relative_verse_number",
"label": "Relative Verse Number",
"datatype": "int",
"description": "The relative verse number of the sloka inside the chapter.",
"show_as_filter": True,
"is_unique": True,
},
{
"name": "sanskrit",
"label": "Lyrics in sanskrit",
"datatype": "str",
"description": "The original sloka in sanskrit.",
"show_as_filter": True,
},
],
"pdf_path": "./data/taitriya_upanishad.pdf",
"source": "https://stotranidhi.com/",
"language": "san+eng",
"example_labels": [
"Seeksha Valli",
],
"examples": [
"Show some verses from Seeksha Valli",
],
"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": "Stotranidhi",
"url": "https://stotranidhi.com/",
"role": "Data provider",
}
],
"audio": [
{
"name": "Sri Krishnan Chakravarthy",
"url": "https://www.youtube.com",
"role": "Recitation audio provider",
},
],
"video": [],
},
"audio_modes": {
"recitation": "Recitation",
"santhai": "Santhai",
},
}