Spaces:
Running
Running
Upload folder using huggingface_hub
Browse files- copy_chromadb.py +27 -1
- modules/config/__init__.py +10 -0
- modules/config/devaraja_mangalam.py +92 -0
- modules/config/dhati_panchakam.py +92 -0
- modules/config/mukthaka_mangalam.py +92 -0
- modules/config/venkateswara_stotram.py +92 -0
- modules/config/yathiraja_vimsathi.py +92 -0
copy_chromadb.py
CHANGED
|
@@ -242,7 +242,33 @@ db_config = {
|
|
| 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")
|
|
|
|
| 242 |
"source_db_path": "../stotra_patam_ai/chromadb_store",
|
| 243 |
"source_collection_name": "ranganatha_stotram",
|
| 244 |
"destination_collection_name": "ranganatha_stotram"
|
| 245 |
+
},
|
| 246 |
+
"devaraja_mangalam": {
|
| 247 |
+
"source_db_path": "../stotra_patam_ai/chromadb_store",
|
| 248 |
+
"source_collection_name": "devaraja_mangalam",
|
| 249 |
+
"destination_collection_name": "devaraja_mangalam"
|
| 250 |
+
},
|
| 251 |
+
"dhati_panchakam": {
|
| 252 |
+
"source_db_path": "../stotra_patam_ai/chromadb_store",
|
| 253 |
+
"source_collection_name": "dhati_panchakam",
|
| 254 |
+
"destination_collection_name": "dhati_panchakam"
|
| 255 |
+
},
|
| 256 |
+
"mukthaka_mangalam": {
|
| 257 |
+
"source_db_path": "../stotra_patam_ai/chromadb_store",
|
| 258 |
+
"source_collection_name": "mukthaka_mangalam",
|
| 259 |
+
"destination_collection_name": "mukthaka_mangalam"
|
| 260 |
+
},
|
| 261 |
+
"venkateswara_stotram": {
|
| 262 |
+
"source_db_path": "../stotra_patam_ai/chromadb_store",
|
| 263 |
+
"source_collection_name": "venkateswara_stotram",
|
| 264 |
+
"destination_collection_name": "venkateswara_stotram"
|
| 265 |
+
},
|
| 266 |
+
"yathiraja_vimsathi": {
|
| 267 |
+
"source_db_path": "../stotra_patam_ai/chromadb_store",
|
| 268 |
+
"source_collection_name": "yathiraja_vimsathi",
|
| 269 |
+
"destination_collection_name": "yathiraja_vimsathi"
|
| 270 |
+
}
|
| 271 |
+
|
| 272 |
}
|
| 273 |
|
| 274 |
parser = argparse.ArgumentParser(description="My app with database parameter")
|
modules/config/__init__.py
CHANGED
|
@@ -9,6 +9,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
|
|
@@ -20,6 +22,7 @@ from modules.config.kurmapuranam import kurmapuranam_config
|
|
| 20 |
from modules.config.lingapuranam import lingapuranam_config
|
| 21 |
from modules.config.markandeypuranam import markandeypuranam_config
|
| 22 |
from modules.config.matsyapuranam import matsyapuranam_config
|
|
|
|
| 23 |
from modules.config.naradapuranam import naradapuranam_config
|
| 24 |
from modules.config.narayaneeyam import narayaneeyam_config
|
| 25 |
from modules.config.padmapuranam import padmapuranam_config
|
|
@@ -42,8 +45,10 @@ from modules.config.vaayupuraanam import vaayupuraanam_config
|
|
| 42 |
from modules.config.vaazhi_thirunaamams import vaazhi_thirunaamams_config
|
| 43 |
from modules.config.valmiki_ramayanam import valmiki_ramayanam_config
|
| 44 |
from modules.config.varahapuranam import varahapuranam_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
|
|
@@ -104,4 +109,9 @@ scripture_configurations = [
|
|
| 104 |
narasimha_ashtakam_config,
|
| 105 |
panchayudha_stotram_config,
|
| 106 |
ranganatha_stotram_config,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 107 |
]
|
|
|
|
| 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.devaraja_mangalam import devaraja_mangalam_config
|
| 13 |
+
from modules.config.dhati_panchakam import dhati_panchakam_config
|
| 14 |
from modules.config.divya_prabandham import divya_prabandham_config
|
| 15 |
from modules.config.divya_prabandham_taniyans import divya_prabandham_taniyans_config
|
| 16 |
from modules.config.garudapuranam import garudapuranam_config
|
|
|
|
| 22 |
from modules.config.lingapuranam import lingapuranam_config
|
| 23 |
from modules.config.markandeypuranam import markandeypuranam_config
|
| 24 |
from modules.config.matsyapuranam import matsyapuranam_config
|
| 25 |
+
from modules.config.mukthaka_mangalam import mukthaka_mangalam_config
|
| 26 |
from modules.config.naradapuranam import naradapuranam_config
|
| 27 |
from modules.config.narayaneeyam import narayaneeyam_config
|
| 28 |
from modules.config.padmapuranam import padmapuranam_config
|
|
|
|
| 45 |
from modules.config.vaazhi_thirunaamams import vaazhi_thirunaamams_config
|
| 46 |
from modules.config.valmiki_ramayanam import valmiki_ramayanam_config
|
| 47 |
from modules.config.varahapuranam import varahapuranam_config
|
| 48 |
+
from modules.config.venkateswara_stotram import venkateswara_stotram_config
|
| 49 |
from modules.config.vishnu_puranam import vishnupuranam_config
|
| 50 |
from modules.config.vishnu_sahasranamam import vishnu_sahasranamam_config
|
| 51 |
+
from modules.config.yathiraja_vimsathi import yathiraja_vimsathi_config
|
| 52 |
from modules.config.yt_metadata import yt_metadata_config
|
| 53 |
from modules.config.geethartha_sangraha import geethartha_sangraha_config
|
| 54 |
from modules.config.mukunda_mala import mukunda_mala_config
|
|
|
|
| 109 |
narasimha_ashtakam_config,
|
| 110 |
panchayudha_stotram_config,
|
| 111 |
ranganatha_stotram_config,
|
| 112 |
+
devaraja_mangalam_config,
|
| 113 |
+
mukthaka_mangalam_config,
|
| 114 |
+
venkateswara_stotram_config,
|
| 115 |
+
yathiraja_vimsathi_config,
|
| 116 |
+
dhati_panchakam_config,
|
| 117 |
]
|
modules/config/devaraja_mangalam.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_mangalam_config = {
|
| 5 |
+
"name": "devaraja_mangalam",
|
| 6 |
+
"title": "Devaraja Mangalam",
|
| 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_mangalam",
|
| 10 |
+
"collection_name": "devaraja_mangalam",
|
| 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 Manavala Mamunigal",
|
| 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/devaraja_mangalam.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/devarAjamangalam.html",
|
| 86 |
+
"role": "Data Provider"
|
| 87 |
+
}
|
| 88 |
+
],
|
| 89 |
+
"audio": [],
|
| 90 |
+
"video": [],
|
| 91 |
+
},
|
| 92 |
+
}
|
modules/config/dhati_panchakam.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 |
+
dhati_panchakam_config = {
|
| 5 |
+
"name": "dhati_panchakam",
|
| 6 |
+
"title": "Dhati Panchakam",
|
| 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/dhati_panchakam",
|
| 10 |
+
"collection_name": "dhati_panchakam",
|
| 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 Kooraththazhvan",
|
| 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/dhati_panchakam.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": "vignanam.org",
|
| 85 |
+
"url": "https://vignanam.org/devanagari/dhati-panchakam.html",
|
| 86 |
+
"role": "Data Provider"
|
| 87 |
+
}
|
| 88 |
+
],
|
| 89 |
+
"audio": [],
|
| 90 |
+
"video": [],
|
| 91 |
+
},
|
| 92 |
+
}
|
modules/config/mukthaka_mangalam.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 |
+
mukthaka_mangalam_config = {
|
| 5 |
+
"name": "mukthaka_mangalam",
|
| 6 |
+
"title": "Mukthaka Mangalam",
|
| 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/mukthaka_mangalam",
|
| 10 |
+
"collection_name": "mukthaka_mangalam",
|
| 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 Manavala Mamunigal",
|
| 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/mukthaka_mangalam.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": "stotranidhi.com",
|
| 85 |
+
"url": "https://stotranidhi.com/hi/mukthaka-mangalam-sri-manavala-mamunigal-in-sanskrit/",
|
| 86 |
+
"role": "Data Provider"
|
| 87 |
+
}
|
| 88 |
+
],
|
| 89 |
+
"audio": [],
|
| 90 |
+
"video": [],
|
| 91 |
+
},
|
| 92 |
+
}
|
modules/config/venkateswara_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 |
+
venkateswara_stotram_config = {
|
| 5 |
+
"name": "venkateswara_stotram",
|
| 6 |
+
"title": "Venkateswara 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/venkateswara_stotram",
|
| 10 |
+
"collection_name": "venkateswara_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: "Shri Prativadi Bayankara Annan Swami",
|
| 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/venkateswara_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/venkateshvara.html",
|
| 86 |
+
"role": "Data Provider"
|
| 87 |
+
}
|
| 88 |
+
],
|
| 89 |
+
"audio": [],
|
| 90 |
+
"video": [],
|
| 91 |
+
},
|
| 92 |
+
}
|
modules/config/yathiraja_vimsathi.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 |
+
yathiraja_vimsathi_config = {
|
| 5 |
+
"name": "yathiraja_vimsathi",
|
| 6 |
+
"title": "Yathiraja Vimsathi",
|
| 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/yathiraja_vimsathi",
|
| 10 |
+
"collection_name": "yathiraja_vimsathi",
|
| 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 Manavala Mamunigal",
|
| 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/yathiraja_vimsathi.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_deities_misc/yatirAjaviMshati.html",
|
| 86 |
+
"role": "Data Provider"
|
| 87 |
+
}
|
| 88 |
+
],
|
| 89 |
+
"audio": [],
|
| 90 |
+
"video": [],
|
| 91 |
+
},
|
| 92 |
+
}
|