Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Upload folder using huggingface_hub
Browse files- copy_chromadb.py +5 -0
- modules/config/__init__.py +2 -0
- modules/config/divya_prabandham.py +0 -9
- modules/config/padhuka_sahasram.py +123 -0
copy_chromadb.py
CHANGED
|
@@ -278,6 +278,11 @@ db_config = {
|
|
| 278 |
"source_collection_name": "aarthi_prabandham",
|
| 279 |
"destination_collection_name": "aarthi_prabandham"
|
| 280 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 281 |
|
| 282 |
}
|
| 283 |
|
|
|
|
| 278 |
"source_collection_name": "aarthi_prabandham",
|
| 279 |
"destination_collection_name": "aarthi_prabandham"
|
| 280 |
},
|
| 281 |
+
"padhuka_sahasram": {
|
| 282 |
+
"source_db_path": "../padhuka_sahasram/chromadb_store",
|
| 283 |
+
"source_collection_name": "padhuka_sahasram",
|
| 284 |
+
"destination_collection_name": "padhuka_sahasram"
|
| 285 |
+
},
|
| 286 |
|
| 287 |
}
|
| 288 |
|
modules/config/__init__.py
CHANGED
|
@@ -27,6 +27,7 @@ from modules.config.matsyapuranam import matsyapuranam_config
|
|
| 27 |
from modules.config.mukthaka_mangalam import mukthaka_mangalam_config
|
| 28 |
from modules.config.naradapuranam import naradapuranam_config
|
| 29 |
from modules.config.narayaneeyam import narayaneeyam_config
|
|
|
|
| 30 |
from modules.config.padmapuranam import padmapuranam_config
|
| 31 |
from modules.config.pancha_sooktham import pancha_sooktham_config
|
| 32 |
from modules.config.raghuveera_gadhyam import raghuveera_gadhyam_config
|
|
@@ -118,4 +119,5 @@ scripture_configurations = [
|
|
| 118 |
dhati_panchakam_config,
|
| 119 |
gadhyathrayam_config,
|
| 120 |
aarthi_prabandham_config,
|
|
|
|
| 121 |
]
|
|
|
|
| 27 |
from modules.config.mukthaka_mangalam import mukthaka_mangalam_config
|
| 28 |
from modules.config.naradapuranam import naradapuranam_config
|
| 29 |
from modules.config.narayaneeyam import narayaneeyam_config
|
| 30 |
+
from modules.config.padhuka_sahasram import padhuka_sahasram_config
|
| 31 |
from modules.config.padmapuranam import padmapuranam_config
|
| 32 |
from modules.config.pancha_sooktham import pancha_sooktham_config
|
| 33 |
from modules.config.raghuveera_gadhyam import raghuveera_gadhyam_config
|
|
|
|
| 119 |
dhati_panchakam_config,
|
| 120 |
gadhyathrayam_config,
|
| 121 |
aarthi_prabandham_config,
|
| 122 |
+
padhuka_sahasram_config
|
| 123 |
]
|
modules/config/divya_prabandham.py
CHANGED
|
@@ -231,15 +231,6 @@ divya_prabandham_config = {
|
|
| 231 |
],
|
| 232 |
"photo_url": "https://drive.google.com/uc?export=download&id=1HB1Nr39j2-55rIeOK_wYNbZZndcGZIaf",
|
| 233 |
},
|
| 234 |
-
{
|
| 235 |
-
"name": "Sri C. Badrinarayanan Swamy(Triplicane)",
|
| 236 |
-
"url": "https://google.com",
|
| 237 |
-
"role": "Recitation audio contributor",
|
| 238 |
-
"context": [
|
| 239 |
-
{"start": 1378, "end": 2378, "description": "Periya Thirumozhi"}
|
| 240 |
-
],
|
| 241 |
-
"photo_url": "https://drive.google.com/uc?export=download&id=1baSw4yzmn0ZG79x7jIGpRUl_eY5lUjZf",
|
| 242 |
-
},
|
| 243 |
{
|
| 244 |
"name": "Sri TNCN Swamy(Triplicane)",
|
| 245 |
"url": "https://www.linkedin.com/in/narashiman-chakravarthy-54326111/",
|
|
|
|
| 231 |
],
|
| 232 |
"photo_url": "https://drive.google.com/uc?export=download&id=1HB1Nr39j2-55rIeOK_wYNbZZndcGZIaf",
|
| 233 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 234 |
{
|
| 235 |
"name": "Sri TNCN Swamy(Triplicane)",
|
| 236 |
"url": "https://www.linkedin.com/in/narashiman-chakravarthy-54326111/",
|
modules/config/padhuka_sahasram.py
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from modules.config.categories import ScriptureCategoryConstants
|
| 2 |
+
from modules.google_drive.google_drive_utils import convert_drive_url_to_direct
|
| 3 |
+
|
| 4 |
+
padhuka_sahasram_config = {
|
| 5 |
+
"name": "padhuka_sahasram",
|
| 6 |
+
"title": "Padhuka Sahasram",
|
| 7 |
+
"banner_url": convert_drive_url_to_direct(
|
| 8 |
+
"https://drive.google.com/file/d/1aRvTo0rOqwWgV_gekntrw1h0B0Hln3Yf/view?usp=drive_link"
|
| 9 |
+
),
|
| 10 |
+
"category": ScriptureCategoryConstants.SRI_SOOKTHI,
|
| 11 |
+
"output_dir": "./outputs/padhuka_sahasram",
|
| 12 |
+
"collection_name": "padhuka_sahasram",
|
| 13 |
+
"collection_embedding_fn": "openai",
|
| 14 |
+
"unit": "slokam",
|
| 15 |
+
"unit_field": "_global_index",
|
| 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('relative_verse_number')}",
|
| 21 |
+
"author": lambda doc: "Srimannigamantha Maha Desikar",
|
| 22 |
+
},
|
| 23 |
+
"metadata_fields": [
|
| 24 |
+
{
|
| 25 |
+
"name": "chapter_name",
|
| 26 |
+
"datatype": "str",
|
| 27 |
+
"label": "Chapter Name",
|
| 28 |
+
"description": "Chapter title",
|
| 29 |
+
"show_as_filter": True,
|
| 30 |
+
"component": "dropdown",
|
| 31 |
+
"lov": lambda: [
|
| 32 |
+
"1. प्रस्तावपद्धतिः (20)",
|
| 33 |
+
"2. समाख्यापद्धतिः (10)",
|
| 34 |
+
"3. प्रभावपद्धतिः (70)",
|
| 35 |
+
"4. समर्पणपद्धतिः (20)",
|
| 36 |
+
"5. प्रतिप्रस्थानपद्धतिः (20)",
|
| 37 |
+
"6. अधिकारपरिग्रहपद्धतिः (40)",
|
| 38 |
+
"7. अभिषेकपद्धतिः (30)",
|
| 39 |
+
"8. निर्यातनापद्धतिः (30)",
|
| 40 |
+
"9. वन्दिवैतालिकपद्धतिः (10)",
|
| 41 |
+
"10. शृङ्गारपद्धतिः (10)",
|
| 42 |
+
"11. सञ्चारपद्धतिः (60)",
|
| 43 |
+
"12. पुष्पपद्धतिः (30)",
|
| 44 |
+
"13. परागपद्धतिः (30)",
|
| 45 |
+
"14. नादपद्धतिः (100)",
|
| 46 |
+
"15. रत्नसामान्यपद्धतिः (50)",
|
| 47 |
+
"16. बहुरत्नपद्धतिः (50)",
|
| 48 |
+
"17. पद्मरागपद्धतिः (30)",
|
| 49 |
+
"18. मुक्तापद्धतिः (50)",
|
| 50 |
+
"19. मरकतपद्धतिः (20)",
|
| 51 |
+
"20. इन्द्रनीलपद्धतिः (30)",
|
| 52 |
+
"21. बिम्बप्रतिबिम्बपद्धतिः (20)",
|
| 53 |
+
"22. काञ्चनपद्धतिः (20)",
|
| 54 |
+
"23. शेषपद्धतिः (10)",
|
| 55 |
+
"24. द्वन्द्वपद्धतिः (20)",
|
| 56 |
+
"25. सन्निवेशपद्धतिः (20)",
|
| 57 |
+
"26. यन्त्रिकापद्धतिः (10)",
|
| 58 |
+
"27. रेखापद्धतिः (10)",
|
| 59 |
+
"28. सुभाषितपद्धतिः (10)",
|
| 60 |
+
"29. प्रकीर्णकपद्धतिः (80)",
|
| 61 |
+
"30. चित्रपद्धतिः (40)",
|
| 62 |
+
"31. निर्वेदपद्धतिः (20)",
|
| 63 |
+
"32. फलपद्धतिः (38)",
|
| 64 |
+
],
|
| 65 |
+
},
|
| 66 |
+
{
|
| 67 |
+
"name": "_global_index",
|
| 68 |
+
"datatype": "int",
|
| 69 |
+
"label": "Global Index",
|
| 70 |
+
"description": "Absolute verse index",
|
| 71 |
+
"show_as_filter": True,
|
| 72 |
+
"is_unique": True,
|
| 73 |
+
},
|
| 74 |
+
{
|
| 75 |
+
"name": "relative_verse_number",
|
| 76 |
+
"datatype": "int",
|
| 77 |
+
"label": "Verse Number (in chapter)",
|
| 78 |
+
"description": "Sequential verse index inside the chapter",
|
| 79 |
+
"show_as_filter": True,
|
| 80 |
+
},
|
| 81 |
+
{
|
| 82 |
+
"name": "lyrics_sa",
|
| 83 |
+
"datatype": "str",
|
| 84 |
+
"label": "Sanskrit Verse",
|
| 85 |
+
"description": "Original verse text in Sanskrit",
|
| 86 |
+
"show_as_filter": True,
|
| 87 |
+
},
|
| 88 |
+
],
|
| 89 |
+
"pdf_path": "./data/padhuka_sahasram.pdf",
|
| 90 |
+
"source": "sanskritdocuments.org",
|
| 91 |
+
"language": "san",
|
| 92 |
+
"example_labels": [],
|
| 93 |
+
"examples": [],
|
| 94 |
+
"llm_hints": [],
|
| 95 |
+
"credits": {
|
| 96 |
+
"art": [
|
| 97 |
+
{
|
| 98 |
+
"name": "Sri TNCN",
|
| 99 |
+
"url": "https://www.linkedin.com/in/narashiman-chakravarthy-54326111/",
|
| 100 |
+
"role": "Illustrator",
|
| 101 |
+
"notes": "Original artwork used with permission",
|
| 102 |
+
"photo_url": "https://drive.google.com/uc?export=download&id=1D4Vo-Mvkp1RdZR6whUkcjvNBIW1yHSUE",
|
| 103 |
+
}
|
| 104 |
+
],
|
| 105 |
+
"data": [
|
| 106 |
+
{
|
| 107 |
+
"name": "sanskritdocuments.org",
|
| 108 |
+
"url": "https://sanskritdocuments.org/doc_raama/pAdukAsahasram.html",
|
| 109 |
+
"role": "Data Provider",
|
| 110 |
+
}
|
| 111 |
+
],
|
| 112 |
+
"audio": [
|
| 113 |
+
{
|
| 114 |
+
"name": "Sri Vasudevan Srinivasachariar Swamy(Srirangam)",
|
| 115 |
+
"url": "https://www.youtube.com/@akivasudev",
|
| 116 |
+
"role": "Recitation audio contributor",
|
| 117 |
+
"context": [],
|
| 118 |
+
"photo_url": "https://drive.google.com/uc?export=download&id=1HB1Nr39j2-55rIeOK_wYNbZZndcGZIaf",
|
| 119 |
+
},
|
| 120 |
+
],
|
| 121 |
+
"video": [],
|
| 122 |
+
},
|
| 123 |
+
}
|