sanatan_ai / modules /config /pancha_sooktham.py
vikramvasudevan's picture
Upload folder using huggingface_hub
7be9035 verified
from modules.config.categories import ScriptureCategoryConstants
from modules.google_drive.google_drive_utils import convert_drive_url_to_direct
from modules.scripture_helpers.pancha_sooktham_helper import (
get_chapter_order_from_pancha_sooktham,
get_pancha_sooktham_chapters,
)
pancha_sooktham_config = {
"name": "pancha_sooktham",
"title": "Pancha Sooktham",
"banner_url": convert_drive_url_to_direct(
"https://drive.google.com/file/d/1EPxyciI9WaVRH6oIrW7D-w4PkYs3SQmy/view?usp=drive_link"
),
"category": ScriptureCategoryConstants.VEDAM,
"output_dir": "./output/pancha_sooktham",
"collection_name": "pancha_sooktham",
"collection_embedding_fn": "openai",
"unit": "verse",
"unit_field": "relative_verse_number",
"chapter_order": lambda: get_chapter_order_from_pancha_sooktham(),
"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_pancha_sooktham_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/pancha_sooktham.pdf",
"source": "https://stotranidhi.com/",
"language": "san+eng",
"example_labels": [
"Purusha Sooktham",
],
"examples": [
"Show some verses from purusha sooktham",
],
"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": "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",
},
{
"name": "Sri Vijayaghavan Chakravarthy",
"url": "https://www.youtube.com/@onedayonepasuram6126",
"role": "Recitation audio provider",
"photo_url": "https://drive.google.com/uc?export=download&id=1Iu6fCN76eaax5RLcoWR6UMAs9Xn6Y6Ap",
},
],
"video": [],
},
}