Spaces:
Running
Running
Upload folder using huggingface_hub
Browse files- copy_chromadb.py +31 -2
- modules/config/__init__.py +13 -2
- modules/config/devaraja_ashtakam.py +92 -0
- modules/config/geethartha_sangraha.py +92 -0
- modules/config/mukunda_mala.py +92 -0
- modules/config/narasimha_ashtakam.py +92 -0
- modules/config/panchayudha_stotram.py +92 -0
- modules/config/ranganatha_stotram.py +92 -0
- modules/config/thiruvaimozhi_nootrandhadhi.py +1 -0
- modules/config/upadesa_rathnamalai.py +1 -0
copy_chromadb.py
CHANGED
|
@@ -212,8 +212,37 @@ db_config = {
|
|
| 212 |
"source_db_path": "../thiruvaimozhi_nootrandhadhi_ai/chromadb_store",
|
| 213 |
"source_collection_name": "thiruvaimozhi_nootrandhadhi",
|
| 214 |
"destination_collection_name": "thiruvaimozhi_nootrandhadhi"
|
| 215 |
-
}
|
| 216 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 217 |
}
|
| 218 |
|
| 219 |
parser = argparse.ArgumentParser(description="My app with database parameter")
|
|
|
|
| 212 |
"source_db_path": "../thiruvaimozhi_nootrandhadhi_ai/chromadb_store",
|
| 213 |
"source_collection_name": "thiruvaimozhi_nootrandhadhi",
|
| 214 |
"destination_collection_name": "thiruvaimozhi_nootrandhadhi"
|
| 215 |
+
},
|
| 216 |
+
"devaraja_ashtakam": {
|
| 217 |
+
"source_db_path": "../stotra_patam_ai/chromadb_store",
|
| 218 |
+
"source_collection_name": "devaraja_ashtakam",
|
| 219 |
+
"destination_collection_name": "devaraja_ashtakam"
|
| 220 |
+
},
|
| 221 |
+
"geethartha_sangraha": {
|
| 222 |
+
"source_db_path": "../stotra_patam_ai/chromadb_store",
|
| 223 |
+
"source_collection_name": "geethartha_sangraha",
|
| 224 |
+
"destination_collection_name": "geethartha_sangraha"
|
| 225 |
+
},
|
| 226 |
+
"mukunda_mala": {
|
| 227 |
+
"source_db_path": "../stotra_patam_ai/chromadb_store",
|
| 228 |
+
"source_collection_name": "mukunda_mala",
|
| 229 |
+
"destination_collection_name": "mukunda_mala"
|
| 230 |
+
},
|
| 231 |
+
"narasimha_ashtakam": {
|
| 232 |
+
"source_db_path": "../stotra_patam_ai/chromadb_store",
|
| 233 |
+
"source_collection_name": "narasimha_ashtakam",
|
| 234 |
+
"destination_collection_name": "narasimha_ashtakam"
|
| 235 |
+
},
|
| 236 |
+
"panchayudha_stotram": {
|
| 237 |
+
"source_db_path": "../stotra_patam_ai/chromadb_store",
|
| 238 |
+
"source_collection_name": "panchayudha_stotram",
|
| 239 |
+
"destination_collection_name": "panchayudha_stotram"
|
| 240 |
+
},
|
| 241 |
+
"ranganatha_stotram": {
|
| 242 |
+
"source_db_path": "../stotra_patam_ai/chromadb_store",
|
| 243 |
+
"source_collection_name": "ranganatha_stotram",
|
| 244 |
+
"destination_collection_name": "ranganatha_stotram"
|
| 245 |
+
}
|
| 246 |
}
|
| 247 |
|
| 248 |
parser = argparse.ArgumentParser(description="My app with database parameter")
|
modules/config/__init__.py
CHANGED
|
@@ -8,6 +8,7 @@ from modules.config.brahmapuranam import brahmapuranam_config
|
|
| 8 |
from modules.config.brahmavaivarthapurana import brahmavaivarthapurana_config
|
| 9 |
from modules.config.chathusloki import chathusloki_config
|
| 10 |
from modules.config.desika_prabandham import desika_prabandham_config
|
|
|
|
| 11 |
from modules.config.divya_prabandham import divya_prabandham_config
|
| 12 |
from modules.config.divya_prabandham_taniyans import divya_prabandham_taniyans_config
|
| 13 |
from modules.config.garudapuranam import garudapuranam_config
|
|
@@ -44,7 +45,11 @@ from modules.config.varahapuranam import varahapuranam_config
|
|
| 44 |
from modules.config.vishnu_puranam import vishnupuranam_config
|
| 45 |
from modules.config.vishnu_sahasranamam import vishnu_sahasranamam_config
|
| 46 |
from modules.config.yt_metadata import yt_metadata_config
|
| 47 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 48 |
|
| 49 |
scripture_configurations = [
|
| 50 |
bhagavat_gita_config,
|
|
@@ -92,5 +97,11 @@ scripture_configurations = [
|
|
| 92 |
varahapuranam_config,
|
| 93 |
vaazhi_thirunaamams_config,
|
| 94 |
upadesa_rathnamalai_config,
|
| 95 |
-
thiruvaimozhi_nootrandhadhi_config
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 96 |
]
|
|
|
|
| 8 |
from modules.config.brahmavaivarthapurana import brahmavaivarthapurana_config
|
| 9 |
from modules.config.chathusloki import chathusloki_config
|
| 10 |
from modules.config.desika_prabandham import desika_prabandham_config
|
| 11 |
+
from modules.config.devaraja_ashtakam import devaraja_ashtakam_config
|
| 12 |
from modules.config.divya_prabandham import divya_prabandham_config
|
| 13 |
from modules.config.divya_prabandham_taniyans import divya_prabandham_taniyans_config
|
| 14 |
from modules.config.garudapuranam import garudapuranam_config
|
|
|
|
| 45 |
from modules.config.vishnu_puranam import vishnupuranam_config
|
| 46 |
from modules.config.vishnu_sahasranamam import vishnu_sahasranamam_config
|
| 47 |
from modules.config.yt_metadata import yt_metadata_config
|
| 48 |
+
from modules.config.geethartha_sangraha import geethartha_sangraha_config
|
| 49 |
+
from modules.config.mukunda_mala import mukunda_mala_config
|
| 50 |
+
from modules.config.narasimha_ashtakam import narasimha_ashtakam_config
|
| 51 |
+
from modules.config.panchayudha_stotram import panchayudha_stotram_config
|
| 52 |
+
from modules.config.ranganatha_stotram import ranganatha_stotram_config
|
| 53 |
|
| 54 |
scripture_configurations = [
|
| 55 |
bhagavat_gita_config,
|
|
|
|
| 97 |
varahapuranam_config,
|
| 98 |
vaazhi_thirunaamams_config,
|
| 99 |
upadesa_rathnamalai_config,
|
| 100 |
+
thiruvaimozhi_nootrandhadhi_config,
|
| 101 |
+
devaraja_ashtakam_config,
|
| 102 |
+
geethartha_sangraha_config,
|
| 103 |
+
mukunda_mala_config,
|
| 104 |
+
narasimha_ashtakam_config,
|
| 105 |
+
panchayudha_stotram_config,
|
| 106 |
+
ranganatha_stotram_config,
|
| 107 |
]
|
modules/config/devaraja_ashtakam.py
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from modules.config.categories import ScriptureCategoryConstants
|
| 2 |
+
from modules.google_drive.google_drive_utils import convert_drive_url_to_direct
|
| 3 |
+
|
| 4 |
+
devaraja_ashtakam_config = {
|
| 5 |
+
"name": "devaraja_ashtakam",
|
| 6 |
+
"title": "Devaraja Ashtakam",
|
| 7 |
+
"banner_url": convert_drive_url_to_direct("https://drive.google.com/file/d/1uLPo1Upx1vLJ6InxqOEMspAOz4UT1F4r/view?usp=drive_link"),
|
| 8 |
+
"category": ScriptureCategoryConstants.SRI_SOOKTHI,
|
| 9 |
+
"output_dir": "./outputs/devaraja_ashtakam",
|
| 10 |
+
"collection_name": "devaraja_ashtakam",
|
| 11 |
+
"collection_embedding_fn": "openai",
|
| 12 |
+
|
| 13 |
+
"unit": "slokam",
|
| 14 |
+
"unit_field": "_global_index",
|
| 15 |
+
|
| 16 |
+
"field_mapping": {
|
| 17 |
+
"text": "lyrics_sa",
|
| 18 |
+
"chapter_name": "chapter_name",
|
| 19 |
+
"unit_index": "_global_index",
|
| 20 |
+
"relative_path": lambda doc: f"{doc.get('chapter_name')} — {doc.get('slokam_index')}",
|
| 21 |
+
"author": lambda doc: "Thirukkacchi Nambi",
|
| 22 |
+
},
|
| 23 |
+
|
| 24 |
+
"metadata_fields": [
|
| 25 |
+
{
|
| 26 |
+
"name": "chapter_name",
|
| 27 |
+
"datatype": "str",
|
| 28 |
+
"label": "Chapter Name",
|
| 29 |
+
"description": "Chapter title",
|
| 30 |
+
"show_as_filter": True,
|
| 31 |
+
"component": "dropdown",
|
| 32 |
+
"lov": lambda: ["DYANA SLOKA", "SLOKAM"],
|
| 33 |
+
},
|
| 34 |
+
{
|
| 35 |
+
"name": "_global_index",
|
| 36 |
+
"datatype": "int",
|
| 37 |
+
"label": "Global Index",
|
| 38 |
+
"description": "Absolute verse index",
|
| 39 |
+
"show_as_filter": True,
|
| 40 |
+
"is_unique": True,
|
| 41 |
+
},
|
| 42 |
+
{
|
| 43 |
+
"name": "chapter_index",
|
| 44 |
+
"datatype": "int",
|
| 45 |
+
"label": "Chapter Index",
|
| 46 |
+
"description": "Chapter index",
|
| 47 |
+
},
|
| 48 |
+
{
|
| 49 |
+
"name": "slokam_index",
|
| 50 |
+
"datatype": "int",
|
| 51 |
+
"label": "Verse Number (in chapter)",
|
| 52 |
+
"description": "Sequential verse index inside the chapter",
|
| 53 |
+
"show_as_filter": True,
|
| 54 |
+
},
|
| 55 |
+
{
|
| 56 |
+
"name": "lyrics_sa",
|
| 57 |
+
"datatype": "str",
|
| 58 |
+
"label": "Sanskrit Verse",
|
| 59 |
+
"description": "Original verse text in Sanskrit",
|
| 60 |
+
"show_as_filter": True,
|
| 61 |
+
},
|
| 62 |
+
],
|
| 63 |
+
|
| 64 |
+
"pdf_path": "./data/devaraja_ashtakam.pdf",
|
| 65 |
+
|
| 66 |
+
"source": "sanskritdocuments.org",
|
| 67 |
+
"language": "san",
|
| 68 |
+
"example_labels": [],
|
| 69 |
+
"examples": [],
|
| 70 |
+
"llm_hints": [],
|
| 71 |
+
|
| 72 |
+
"credits": {
|
| 73 |
+
"art": [
|
| 74 |
+
{
|
| 75 |
+
"name": "Sri TNCN",
|
| 76 |
+
"url": "https://www.linkedin.com/in/narashiman-chakravarthy-54326111/",
|
| 77 |
+
"role": "Illustrator",
|
| 78 |
+
"notes": "Original artwork used with permission",
|
| 79 |
+
"photo_url": "https://drive.google.com/uc?export=download&id=1D4Vo-Mvkp1RdZR6whUkcjvNBIW1yHSUE",
|
| 80 |
+
}
|
| 81 |
+
],
|
| 82 |
+
"data": [
|
| 83 |
+
{
|
| 84 |
+
"name": "sanskritdocuments.org",
|
| 85 |
+
"url": "https://sanskritdocuments.org/doc_vishhnu/devarAjAShTakam.html",
|
| 86 |
+
"role": "Data Provider"
|
| 87 |
+
}
|
| 88 |
+
],
|
| 89 |
+
"audio": [],
|
| 90 |
+
"video": [],
|
| 91 |
+
},
|
| 92 |
+
}
|
modules/config/geethartha_sangraha.py
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from modules.config.categories import ScriptureCategoryConstants
|
| 2 |
+
from modules.google_drive.google_drive_utils import convert_drive_url_to_direct
|
| 3 |
+
|
| 4 |
+
geethartha_sangraha_config = {
|
| 5 |
+
"name": "geethartha_sangraha",
|
| 6 |
+
"title": "Geethartha Sangraha",
|
| 7 |
+
"banner_url": convert_drive_url_to_direct("https://drive.google.com/file/d/1uLPo1Upx1vLJ6InxqOEMspAOz4UT1F4r/view?usp=drive_link"),
|
| 8 |
+
"category": ScriptureCategoryConstants.SRI_SOOKTHI,
|
| 9 |
+
"output_dir": "./outputs/geethartha_sangraha",
|
| 10 |
+
"collection_name": "geethartha_sangraha",
|
| 11 |
+
"collection_embedding_fn": "openai",
|
| 12 |
+
|
| 13 |
+
"unit": "slokam",
|
| 14 |
+
"unit_field": "_global_index",
|
| 15 |
+
|
| 16 |
+
"field_mapping": {
|
| 17 |
+
"text": "lyrics_sa",
|
| 18 |
+
"chapter_name": "chapter_name",
|
| 19 |
+
"unit_index": "_global_index",
|
| 20 |
+
"relative_path": lambda doc: f"{doc.get('chapter_name')} — {doc.get('slokam_index')}",
|
| 21 |
+
"author": lambda doc: "Shri Yamunacharya",
|
| 22 |
+
},
|
| 23 |
+
|
| 24 |
+
"metadata_fields": [
|
| 25 |
+
{
|
| 26 |
+
"name": "chapter_name",
|
| 27 |
+
"datatype": "str",
|
| 28 |
+
"label": "Chapter Name",
|
| 29 |
+
"description": "Chapter title",
|
| 30 |
+
"show_as_filter": True,
|
| 31 |
+
"component": "dropdown",
|
| 32 |
+
"lov": lambda: ["SLOKAM"],
|
| 33 |
+
},
|
| 34 |
+
{
|
| 35 |
+
"name": "_global_index",
|
| 36 |
+
"datatype": "int",
|
| 37 |
+
"label": "Global Index",
|
| 38 |
+
"description": "Absolute verse index",
|
| 39 |
+
"show_as_filter": True,
|
| 40 |
+
"is_unique": True,
|
| 41 |
+
},
|
| 42 |
+
{
|
| 43 |
+
"name": "chapter_index",
|
| 44 |
+
"datatype": "int",
|
| 45 |
+
"label": "Chapter Index",
|
| 46 |
+
"description": "Chapter index",
|
| 47 |
+
},
|
| 48 |
+
{
|
| 49 |
+
"name": "slokam_index",
|
| 50 |
+
"datatype": "int",
|
| 51 |
+
"label": "Verse Number (in chapter)",
|
| 52 |
+
"description": "Sequential verse index inside the chapter",
|
| 53 |
+
"show_as_filter": True,
|
| 54 |
+
},
|
| 55 |
+
{
|
| 56 |
+
"name": "lyrics_sa",
|
| 57 |
+
"datatype": "str",
|
| 58 |
+
"label": "Sanskrit Verse",
|
| 59 |
+
"description": "Original verse text in Sanskrit",
|
| 60 |
+
"show_as_filter": True,
|
| 61 |
+
},
|
| 62 |
+
],
|
| 63 |
+
|
| 64 |
+
"pdf_path": "./data/geethartha_sangraha.pdf",
|
| 65 |
+
|
| 66 |
+
"source": "sanskritdocuments.org",
|
| 67 |
+
"language": "san",
|
| 68 |
+
"example_labels": [],
|
| 69 |
+
"examples": [],
|
| 70 |
+
"llm_hints": [],
|
| 71 |
+
|
| 72 |
+
"credits": {
|
| 73 |
+
"art": [
|
| 74 |
+
{
|
| 75 |
+
"name": "Sri TNCN",
|
| 76 |
+
"url": "https://www.linkedin.com/in/narashiman-chakravarthy-54326111/",
|
| 77 |
+
"role": "Illustrator",
|
| 78 |
+
"notes": "Original artwork used with permission",
|
| 79 |
+
"photo_url": "https://drive.google.com/uc?export=download&id=1D4Vo-Mvkp1RdZR6whUkcjvNBIW1yHSUE",
|
| 80 |
+
}
|
| 81 |
+
],
|
| 82 |
+
"data": [
|
| 83 |
+
{
|
| 84 |
+
"name": "sanskritdocuments.org",
|
| 85 |
+
"url": "https://sanskritdocuments.org/doc_giitaa/gitaarthasangraha.html",
|
| 86 |
+
"role": "Data Provider"
|
| 87 |
+
}
|
| 88 |
+
],
|
| 89 |
+
"audio": [],
|
| 90 |
+
"video": [],
|
| 91 |
+
},
|
| 92 |
+
}
|
modules/config/mukunda_mala.py
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from modules.config.categories import ScriptureCategoryConstants
|
| 2 |
+
from modules.google_drive.google_drive_utils import convert_drive_url_to_direct
|
| 3 |
+
|
| 4 |
+
mukunda_mala_config = {
|
| 5 |
+
"name": "mukunda_mala",
|
| 6 |
+
"title": "Mukunda Mala",
|
| 7 |
+
"banner_url": convert_drive_url_to_direct("https://drive.google.com/file/d/1uLPo1Upx1vLJ6InxqOEMspAOz4UT1F4r/view?usp=drive_link"),
|
| 8 |
+
"category": ScriptureCategoryConstants.SRI_SOOKTHI,
|
| 9 |
+
"output_dir": "./outputs/mukunda_mala",
|
| 10 |
+
"collection_name": "mukunda_mala",
|
| 11 |
+
"collection_embedding_fn": "openai",
|
| 12 |
+
|
| 13 |
+
"unit": "slokam",
|
| 14 |
+
"unit_field": "_global_index",
|
| 15 |
+
|
| 16 |
+
"field_mapping": {
|
| 17 |
+
"text": "lyrics_sa",
|
| 18 |
+
"chapter_name": "chapter_name",
|
| 19 |
+
"unit_index": "_global_index",
|
| 20 |
+
"relative_path": lambda doc: f"{doc.get('chapter_name')} — {doc.get('slokam_index')}",
|
| 21 |
+
"author": lambda doc: "Shri Kulashekhara Azhwar",
|
| 22 |
+
},
|
| 23 |
+
|
| 24 |
+
"metadata_fields": [
|
| 25 |
+
{
|
| 26 |
+
"name": "chapter_name",
|
| 27 |
+
"datatype": "str",
|
| 28 |
+
"label": "Chapter Name",
|
| 29 |
+
"description": "Chapter title",
|
| 30 |
+
"show_as_filter": True,
|
| 31 |
+
"component": "dropdown",
|
| 32 |
+
"lov": lambda: ["DYANA SLOKA", "SLOKAM"],
|
| 33 |
+
},
|
| 34 |
+
{
|
| 35 |
+
"name": "_global_index",
|
| 36 |
+
"datatype": "int",
|
| 37 |
+
"label": "Global Index",
|
| 38 |
+
"description": "Absolute verse index",
|
| 39 |
+
"show_as_filter": True,
|
| 40 |
+
"is_unique": True,
|
| 41 |
+
},
|
| 42 |
+
{
|
| 43 |
+
"name": "chapter_index",
|
| 44 |
+
"datatype": "int",
|
| 45 |
+
"label": "Chapter Index",
|
| 46 |
+
"description": "Chapter index",
|
| 47 |
+
},
|
| 48 |
+
{
|
| 49 |
+
"name": "slokam_index",
|
| 50 |
+
"datatype": "int",
|
| 51 |
+
"label": "Verse Number (in chapter)",
|
| 52 |
+
"description": "Sequential verse index inside the chapter",
|
| 53 |
+
"show_as_filter": True,
|
| 54 |
+
},
|
| 55 |
+
{
|
| 56 |
+
"name": "lyrics_sa",
|
| 57 |
+
"datatype": "str",
|
| 58 |
+
"label": "Sanskrit Verse",
|
| 59 |
+
"description": "Original verse text in Sanskrit",
|
| 60 |
+
"show_as_filter": True,
|
| 61 |
+
},
|
| 62 |
+
],
|
| 63 |
+
|
| 64 |
+
"pdf_path": "./data/mukunda_mala.pdf",
|
| 65 |
+
|
| 66 |
+
"source": "sanskritdocuments.org",
|
| 67 |
+
"language": "san",
|
| 68 |
+
"example_labels": [],
|
| 69 |
+
"examples": [],
|
| 70 |
+
"llm_hints": [],
|
| 71 |
+
|
| 72 |
+
"credits": {
|
| 73 |
+
"art": [
|
| 74 |
+
{
|
| 75 |
+
"name": "Sri TNCN",
|
| 76 |
+
"url": "https://www.linkedin.com/in/narashiman-chakravarthy-54326111/",
|
| 77 |
+
"role": "Illustrator",
|
| 78 |
+
"notes": "Original artwork used with permission",
|
| 79 |
+
"photo_url": "https://drive.google.com/uc?export=download&id=1D4Vo-Mvkp1RdZR6whUkcjvNBIW1yHSUE",
|
| 80 |
+
}
|
| 81 |
+
],
|
| 82 |
+
"data": [
|
| 83 |
+
{
|
| 84 |
+
"name": "sanskritdocuments.org",
|
| 85 |
+
"url": "https://sanskritdocuments.org/doc_vishhnu/mukundamAlA.html",
|
| 86 |
+
"role": "Data Provider"
|
| 87 |
+
}
|
| 88 |
+
],
|
| 89 |
+
"audio": [],
|
| 90 |
+
"video": [],
|
| 91 |
+
},
|
| 92 |
+
}
|
modules/config/narasimha_ashtakam.py
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from modules.config.categories import ScriptureCategoryConstants
|
| 2 |
+
from modules.google_drive.google_drive_utils import convert_drive_url_to_direct
|
| 3 |
+
|
| 4 |
+
narasimha_ashtakam_config = {
|
| 5 |
+
"name": "narasimha_ashtakam",
|
| 6 |
+
"title": "Narasimha Ashtakam",
|
| 7 |
+
"banner_url": convert_drive_url_to_direct("https://drive.google.com/file/d/1uLPo1Upx1vLJ6InxqOEMspAOz4UT1F4r/view?usp=drive_link"),
|
| 8 |
+
"category": ScriptureCategoryConstants.SRI_SOOKTHI,
|
| 9 |
+
"output_dir": "./outputs/narasimha_ashtakam",
|
| 10 |
+
"collection_name": "narasimha_ashtakam",
|
| 11 |
+
"collection_embedding_fn": "openai",
|
| 12 |
+
|
| 13 |
+
"unit": "slokam",
|
| 14 |
+
"unit_field": "_global_index",
|
| 15 |
+
|
| 16 |
+
"field_mapping": {
|
| 17 |
+
"text": "lyrics_sa",
|
| 18 |
+
"chapter_name": "chapter_name",
|
| 19 |
+
"unit_index": "_global_index",
|
| 20 |
+
"relative_path": lambda doc: f"{doc.get('chapter_name')} — {doc.get('slokam_index')}",
|
| 21 |
+
"author": lambda doc: "Swamy Vadhikesari Azhagiyamanavala Jeeyar",
|
| 22 |
+
},
|
| 23 |
+
|
| 24 |
+
"metadata_fields": [
|
| 25 |
+
{
|
| 26 |
+
"name": "chapter_name",
|
| 27 |
+
"datatype": "str",
|
| 28 |
+
"label": "Chapter Name",
|
| 29 |
+
"description": "Chapter title",
|
| 30 |
+
"show_as_filter": True,
|
| 31 |
+
"component": "dropdown",
|
| 32 |
+
"lov": lambda: ["PHALA SLOKAM", "SLOKAM", "THANIYAN"],
|
| 33 |
+
},
|
| 34 |
+
{
|
| 35 |
+
"name": "_global_index",
|
| 36 |
+
"datatype": "int",
|
| 37 |
+
"label": "Global Index",
|
| 38 |
+
"description": "Absolute verse index",
|
| 39 |
+
"show_as_filter": True,
|
| 40 |
+
"is_unique": True,
|
| 41 |
+
},
|
| 42 |
+
{
|
| 43 |
+
"name": "chapter_index",
|
| 44 |
+
"datatype": "int",
|
| 45 |
+
"label": "Chapter Index",
|
| 46 |
+
"description": "Chapter index",
|
| 47 |
+
},
|
| 48 |
+
{
|
| 49 |
+
"name": "slokam_index",
|
| 50 |
+
"datatype": "int",
|
| 51 |
+
"label": "Verse Number (in chapter)",
|
| 52 |
+
"description": "Sequential verse index inside the chapter",
|
| 53 |
+
"show_as_filter": True,
|
| 54 |
+
},
|
| 55 |
+
{
|
| 56 |
+
"name": "lyrics_sa",
|
| 57 |
+
"datatype": "str",
|
| 58 |
+
"label": "Sanskrit Verse",
|
| 59 |
+
"description": "Original verse text in Sanskrit",
|
| 60 |
+
"show_as_filter": True,
|
| 61 |
+
},
|
| 62 |
+
],
|
| 63 |
+
|
| 64 |
+
"pdf_path": "./data/narasimha_ashtakam.pdf",
|
| 65 |
+
|
| 66 |
+
"source": "sanskritdocuments.org",
|
| 67 |
+
"language": "san",
|
| 68 |
+
"example_labels": [],
|
| 69 |
+
"examples": [],
|
| 70 |
+
"llm_hints": [],
|
| 71 |
+
|
| 72 |
+
"credits": {
|
| 73 |
+
"art": [
|
| 74 |
+
{
|
| 75 |
+
"name": "Sri TNCN",
|
| 76 |
+
"url": "https://www.linkedin.com/in/narashiman-chakravarthy-54326111/",
|
| 77 |
+
"role": "Illustrator",
|
| 78 |
+
"notes": "Original artwork used with permission",
|
| 79 |
+
"photo_url": "https://drive.google.com/uc?export=download&id=1D4Vo-Mvkp1RdZR6whUkcjvNBIW1yHSUE",
|
| 80 |
+
}
|
| 81 |
+
],
|
| 82 |
+
"data": [
|
| 83 |
+
{
|
| 84 |
+
"name": "sanskritdocuments.org",
|
| 85 |
+
"url": "https://sanskritdocuments.org/doc_vishhnu/nrisimhAShTakam.html",
|
| 86 |
+
"role": "Data Provider"
|
| 87 |
+
}
|
| 88 |
+
],
|
| 89 |
+
"audio": [],
|
| 90 |
+
"video": [],
|
| 91 |
+
},
|
| 92 |
+
}
|
modules/config/panchayudha_stotram.py
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from modules.config.categories import ScriptureCategoryConstants
|
| 2 |
+
from modules.google_drive.google_drive_utils import convert_drive_url_to_direct
|
| 3 |
+
|
| 4 |
+
panchayudha_stotram_config = {
|
| 5 |
+
"name": "panchayudha_stotram",
|
| 6 |
+
"title": "Panchayudha Stotram",
|
| 7 |
+
"banner_url": convert_drive_url_to_direct("https://drive.google.com/file/d/1uLPo1Upx1vLJ6InxqOEMspAOz4UT1F4r/view?usp=drive_link"),
|
| 8 |
+
"category": ScriptureCategoryConstants.SRI_SOOKTHI,
|
| 9 |
+
"output_dir": "./outputs/panchayudha_stotram",
|
| 10 |
+
"collection_name": "panchayudha_stotram",
|
| 11 |
+
"collection_embedding_fn": "openai",
|
| 12 |
+
|
| 13 |
+
"unit": "slokam",
|
| 14 |
+
"unit_field": "_global_index",
|
| 15 |
+
|
| 16 |
+
"field_mapping": {
|
| 17 |
+
"text": "lyrics_sa",
|
| 18 |
+
"chapter_name": "chapter_name",
|
| 19 |
+
"unit_index": "_global_index",
|
| 20 |
+
"relative_path": lambda doc: f"{doc.get('chapter_name')} — {doc.get('slokam_index')}",
|
| 21 |
+
"author": lambda doc: "",
|
| 22 |
+
},
|
| 23 |
+
|
| 24 |
+
"metadata_fields": [
|
| 25 |
+
{
|
| 26 |
+
"name": "chapter_name",
|
| 27 |
+
"datatype": "str",
|
| 28 |
+
"label": "Chapter Name",
|
| 29 |
+
"description": "Chapter title",
|
| 30 |
+
"show_as_filter": True,
|
| 31 |
+
"component": "dropdown",
|
| 32 |
+
"lov": lambda: ["SLOKAM"],
|
| 33 |
+
},
|
| 34 |
+
{
|
| 35 |
+
"name": "_global_index",
|
| 36 |
+
"datatype": "int",
|
| 37 |
+
"label": "Global Index",
|
| 38 |
+
"description": "Absolute verse index",
|
| 39 |
+
"show_as_filter": True,
|
| 40 |
+
"is_unique": True,
|
| 41 |
+
},
|
| 42 |
+
{
|
| 43 |
+
"name": "chapter_index",
|
| 44 |
+
"datatype": "int",
|
| 45 |
+
"label": "Chapter Index",
|
| 46 |
+
"description": "Chapter index",
|
| 47 |
+
},
|
| 48 |
+
{
|
| 49 |
+
"name": "slokam_index",
|
| 50 |
+
"datatype": "int",
|
| 51 |
+
"label": "Verse Number (in chapter)",
|
| 52 |
+
"description": "Sequential verse index inside the chapter",
|
| 53 |
+
"show_as_filter": True,
|
| 54 |
+
},
|
| 55 |
+
{
|
| 56 |
+
"name": "lyrics_sa",
|
| 57 |
+
"datatype": "str",
|
| 58 |
+
"label": "Sanskrit Verse",
|
| 59 |
+
"description": "Original verse text in Sanskrit",
|
| 60 |
+
"show_as_filter": True,
|
| 61 |
+
},
|
| 62 |
+
],
|
| 63 |
+
|
| 64 |
+
"pdf_path": "./data/panchayudha_stotram.pdf",
|
| 65 |
+
|
| 66 |
+
"source": "sanskritdocuments.org",
|
| 67 |
+
"language": "san",
|
| 68 |
+
"example_labels": [],
|
| 69 |
+
"examples": [],
|
| 70 |
+
"llm_hints": [],
|
| 71 |
+
|
| 72 |
+
"credits": {
|
| 73 |
+
"art": [
|
| 74 |
+
{
|
| 75 |
+
"name": "Sri TNCN",
|
| 76 |
+
"url": "https://www.linkedin.com/in/narashiman-chakravarthy-54326111/",
|
| 77 |
+
"role": "Illustrator",
|
| 78 |
+
"notes": "Original artwork used with permission",
|
| 79 |
+
"photo_url": "https://drive.google.com/uc?export=download&id=1D4Vo-Mvkp1RdZR6whUkcjvNBIW1yHSUE",
|
| 80 |
+
}
|
| 81 |
+
],
|
| 82 |
+
"data": [
|
| 83 |
+
{
|
| 84 |
+
"name": "sanskritdocuments.org",
|
| 85 |
+
"url": "https://sanskritdocuments.org/doc_vishhnu/vishnupanchAyudh.html",
|
| 86 |
+
"role": "Data Provider"
|
| 87 |
+
}
|
| 88 |
+
],
|
| 89 |
+
"audio": [],
|
| 90 |
+
"video": [],
|
| 91 |
+
},
|
| 92 |
+
}
|
modules/config/ranganatha_stotram.py
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from modules.config.categories import ScriptureCategoryConstants
|
| 2 |
+
from modules.google_drive.google_drive_utils import convert_drive_url_to_direct
|
| 3 |
+
|
| 4 |
+
ranganatha_stotram_config = {
|
| 5 |
+
"name": "ranganatha_stotram",
|
| 6 |
+
"title": "Ranganatha Stotram",
|
| 7 |
+
"banner_url": convert_drive_url_to_direct("https://drive.google.com/file/d/1uLPo1Upx1vLJ6InxqOEMspAOz4UT1F4r/view?usp=drive_link"),
|
| 8 |
+
"category": ScriptureCategoryConstants.SRI_SOOKTHI,
|
| 9 |
+
"output_dir": "./outputs/ranganatha_stotram",
|
| 10 |
+
"collection_name": "ranganatha_stotram",
|
| 11 |
+
"collection_embedding_fn": "openai",
|
| 12 |
+
|
| 13 |
+
"unit": "slokam",
|
| 14 |
+
"unit_field": "_global_index",
|
| 15 |
+
|
| 16 |
+
"field_mapping": {
|
| 17 |
+
"text": "lyrics_sa",
|
| 18 |
+
"chapter_name": "chapter_name",
|
| 19 |
+
"unit_index": "_global_index",
|
| 20 |
+
"relative_path": lambda doc: f"{doc.get('chapter_name')} — {doc.get('slokam_index')}",
|
| 21 |
+
"author": lambda doc: "Sri Parasara Bhattar",
|
| 22 |
+
},
|
| 23 |
+
|
| 24 |
+
"metadata_fields": [
|
| 25 |
+
{
|
| 26 |
+
"name": "chapter_name",
|
| 27 |
+
"datatype": "str",
|
| 28 |
+
"label": "Chapter Name",
|
| 29 |
+
"description": "Chapter title",
|
| 30 |
+
"show_as_filter": True,
|
| 31 |
+
"component": "dropdown",
|
| 32 |
+
"lov": lambda: ["SLOKAM", "THANIYAN"],
|
| 33 |
+
},
|
| 34 |
+
{
|
| 35 |
+
"name": "_global_index",
|
| 36 |
+
"datatype": "int",
|
| 37 |
+
"label": "Global Index",
|
| 38 |
+
"description": "Absolute verse index",
|
| 39 |
+
"show_as_filter": True,
|
| 40 |
+
"is_unique": True,
|
| 41 |
+
},
|
| 42 |
+
{
|
| 43 |
+
"name": "chapter_index",
|
| 44 |
+
"datatype": "int",
|
| 45 |
+
"label": "Chapter Index",
|
| 46 |
+
"description": "Chapter index",
|
| 47 |
+
},
|
| 48 |
+
{
|
| 49 |
+
"name": "slokam_index",
|
| 50 |
+
"datatype": "int",
|
| 51 |
+
"label": "Verse Number (in chapter)",
|
| 52 |
+
"description": "Sequential verse index inside the chapter",
|
| 53 |
+
"show_as_filter": True,
|
| 54 |
+
},
|
| 55 |
+
{
|
| 56 |
+
"name": "lyrics_sa",
|
| 57 |
+
"datatype": "str",
|
| 58 |
+
"label": "Sanskrit Verse",
|
| 59 |
+
"description": "Original verse text in Sanskrit",
|
| 60 |
+
"show_as_filter": True,
|
| 61 |
+
},
|
| 62 |
+
],
|
| 63 |
+
|
| 64 |
+
"pdf_path": "./data/ranganatha_stotram.pdf",
|
| 65 |
+
|
| 66 |
+
"source": "sanskritdocuments.org",
|
| 67 |
+
"language": "san",
|
| 68 |
+
"example_labels": [],
|
| 69 |
+
"examples": [],
|
| 70 |
+
"llm_hints": [],
|
| 71 |
+
|
| 72 |
+
"credits": {
|
| 73 |
+
"art": [
|
| 74 |
+
{
|
| 75 |
+
"name": "Sri TNCN",
|
| 76 |
+
"url": "https://www.linkedin.com/in/narashiman-chakravarthy-54326111/",
|
| 77 |
+
"role": "Illustrator",
|
| 78 |
+
"notes": "Original artwork used with permission",
|
| 79 |
+
"photo_url": "https://drive.google.com/uc?export=download&id=1D4Vo-Mvkp1RdZR6whUkcjvNBIW1yHSUE",
|
| 80 |
+
}
|
| 81 |
+
],
|
| 82 |
+
"data": [
|
| 83 |
+
{
|
| 84 |
+
"name": "sanskritdocuments.org",
|
| 85 |
+
"url": "https://sanskritdocuments.org/doc_vishhnu/ranganAthastotram.html",
|
| 86 |
+
"role": "Data Provider"
|
| 87 |
+
}
|
| 88 |
+
],
|
| 89 |
+
"audio": [],
|
| 90 |
+
"video": [],
|
| 91 |
+
},
|
| 92 |
+
}
|
modules/config/thiruvaimozhi_nootrandhadhi.py
CHANGED
|
@@ -23,6 +23,7 @@ thiruvaimozhi_nootrandhadhi_config = {
|
|
| 23 |
"unit_index": "_global_index",
|
| 24 |
"relative_path": lambda doc: f"{doc.get('chapter_name')} — {doc.get('relative_verse_number')}",
|
| 25 |
"word_by_word_native": "word_by_word_en",
|
|
|
|
| 26 |
"translation": lambda doc: "\n\n".join(
|
| 27 |
filter(None, [
|
| 28 |
f"TAMIL:\n{doc.get('translation_ta')}" if doc.get('translation_ta') else None,
|
|
|
|
| 23 |
"unit_index": "_global_index",
|
| 24 |
"relative_path": lambda doc: f"{doc.get('chapter_name')} — {doc.get('relative_verse_number')}",
|
| 25 |
"word_by_word_native": "word_by_word_en",
|
| 26 |
+
"author": lambda doc: f"Manavala Mamunigal",
|
| 27 |
"translation": lambda doc: "\n\n".join(
|
| 28 |
filter(None, [
|
| 29 |
f"TAMIL:\n{doc.get('translation_ta')}" if doc.get('translation_ta') else None,
|
modules/config/upadesa_rathnamalai.py
CHANGED
|
@@ -21,6 +21,7 @@ upadesa_rathnamalai_config = {
|
|
| 21 |
"text": "pasuram",
|
| 22 |
"chapter_name": "chapter_name",
|
| 23 |
"unit_index": "_global_index",
|
|
|
|
| 24 |
"relative_path": lambda doc: f"{doc.get('chapter_name')} — {doc.get('relative_verse_number')}",
|
| 25 |
"translation": "translation",
|
| 26 |
},
|
|
|
|
| 21 |
"text": "pasuram",
|
| 22 |
"chapter_name": "chapter_name",
|
| 23 |
"unit_index": "_global_index",
|
| 24 |
+
"author": lambda doc: f"Manavala Mamunigal",
|
| 25 |
"relative_path": lambda doc: f"{doc.get('chapter_name')} — {doc.get('relative_verse_number')}",
|
| 26 |
"translation": "translation",
|
| 27 |
},
|