Spaces:
Running
Running
Upload folder using huggingface_hub
Browse files- .gitignore +1 -0
- copy_chromadb.py +5 -0
- modules/config/__init__.py +18 -16
- modules/config/vaazhi_thirunaamams.py +94 -0
.gitignore
CHANGED
|
@@ -19,3 +19,4 @@ chroma_exports.zip
|
|
| 19 |
chromadb-store-CORRUPTED/
|
| 20 |
chromadb-store_BLOATED.zip
|
| 21 |
chromadb-store_OLD.zip
|
|
|
|
|
|
| 19 |
chromadb-store-CORRUPTED/
|
| 20 |
chromadb-store_BLOATED.zip
|
| 21 |
chromadb-store_OLD.zip
|
| 22 |
+
chromadb-store-20251205.zip
|
copy_chromadb.py
CHANGED
|
@@ -197,6 +197,11 @@ db_config = {
|
|
| 197 |
"source_db_path": "../puranas_ai/chromadb_store",
|
| 198 |
"source_collection_name": "vishnupuranam",
|
| 199 |
"destination_collection_name": "vishnu_puranam_openai"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 200 |
}
|
| 201 |
}
|
| 202 |
|
|
|
|
| 197 |
"source_db_path": "../puranas_ai/chromadb_store",
|
| 198 |
"source_collection_name": "vishnupuranam",
|
| 199 |
"destination_collection_name": "vishnu_puranam_openai"
|
| 200 |
+
},
|
| 201 |
+
"vaazhi_thirunaamams": {
|
| 202 |
+
"source_db_path": "../vaazhi_thirunamam/chromadb_store",
|
| 203 |
+
"source_collection_name": "vaazhi_thirunaamams",
|
| 204 |
+
"destination_collection_name": "vaazhi_thirunaamams"
|
| 205 |
}
|
| 206 |
}
|
| 207 |
|
modules/config/__init__.py
CHANGED
|
@@ -36,6 +36,7 @@ from modules.config.taitriya_samhitha import taitriya_samhitha_config
|
|
| 36 |
from modules.config.taitriya_upanishad import taitriya_upanishad_config
|
| 37 |
from modules.config.vaamanapuraanam import vaamanapuraanam_config
|
| 38 |
from modules.config.vaayupuraanam import vaayupuraanam_config
|
|
|
|
| 39 |
from modules.config.valmiki_ramayanam import valmiki_ramayanam_config
|
| 40 |
from modules.config.varahapuranam import varahapuranam_config
|
| 41 |
from modules.config.vishnu_puranam import vishnupuranam_config
|
|
@@ -71,20 +72,21 @@ scripture_configurations = [
|
|
| 71 |
narayaneeyam_config,
|
| 72 |
agnipuranam_config,
|
| 73 |
bhavishyapuranam_config,
|
| 74 |
-
brahmandpuranam_config,
|
| 75 |
-
brahmapuranam_config,
|
| 76 |
-
brahmavaivarthapurana_config,
|
| 77 |
-
garudapuranam_config,
|
| 78 |
-
harivanshapuraanam_config,
|
| 79 |
-
kurmapuranam_config,
|
| 80 |
-
lingapuranam_config,
|
| 81 |
-
markandeypuranam_config,
|
| 82 |
-
matsyapuranam_config,
|
| 83 |
-
naradapuranam_config,
|
| 84 |
-
padmapuranam_config,
|
| 85 |
-
shivapuraanam_config,
|
| 86 |
-
skandapuranam_config,
|
| 87 |
-
vaamanapuraanam_config,
|
| 88 |
-
vaayupuraanam_config,
|
| 89 |
-
varahapuranam_config,
|
|
|
|
| 90 |
]
|
|
|
|
| 36 |
from modules.config.taitriya_upanishad import taitriya_upanishad_config
|
| 37 |
from modules.config.vaamanapuraanam import vaamanapuraanam_config
|
| 38 |
from modules.config.vaayupuraanam import vaayupuraanam_config
|
| 39 |
+
from modules.config.vaazhi_thirunaamams import vaazhi_thirunaamams_config
|
| 40 |
from modules.config.valmiki_ramayanam import valmiki_ramayanam_config
|
| 41 |
from modules.config.varahapuranam import varahapuranam_config
|
| 42 |
from modules.config.vishnu_puranam import vishnupuranam_config
|
|
|
|
| 72 |
narayaneeyam_config,
|
| 73 |
agnipuranam_config,
|
| 74 |
bhavishyapuranam_config,
|
| 75 |
+
brahmandpuranam_config,
|
| 76 |
+
brahmapuranam_config,
|
| 77 |
+
brahmavaivarthapurana_config,
|
| 78 |
+
garudapuranam_config,
|
| 79 |
+
harivanshapuraanam_config,
|
| 80 |
+
kurmapuranam_config,
|
| 81 |
+
lingapuranam_config,
|
| 82 |
+
markandeypuranam_config,
|
| 83 |
+
matsyapuranam_config,
|
| 84 |
+
naradapuranam_config,
|
| 85 |
+
padmapuranam_config,
|
| 86 |
+
shivapuraanam_config,
|
| 87 |
+
skandapuranam_config,
|
| 88 |
+
vaamanapuraanam_config,
|
| 89 |
+
vaayupuraanam_config,
|
| 90 |
+
varahapuranam_config,
|
| 91 |
+
vaazhi_thirunaamams_config,
|
| 92 |
]
|
modules/config/vaazhi_thirunaamams.py
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from modules.config.categories import ScriptureCategoryConstants
|
| 2 |
+
from modules.google_drive.google_drive_utils import convert_drive_url_to_direct
|
| 3 |
+
|
| 4 |
+
def get_subjects():
|
| 5 |
+
return sorted(["பெரிய பெருமாள்", "பெரிய பிராட்டியார்", "ஸேனை முதலியார்", "நம்மாழ்வார்", "நாதமுனிகள்", "உய்யக்கொண்டார்", "மணக்கால் நம்பி", "ஆளவந்தார்", "பெரிய நம்பி", "திருக்கச்சி நம்பி", "எம்பெருமானார்", "கூரத்தாழ்வான்", "முதலியாண்டான்", "திருவரங்கத்து அமுதனார்", "எம்பார்", "பட்டர்", "நஞ்சீயர்", "நம்பிள்ளை", "வடக்கு திருவீதிப் பிள்ளை", "பெரியவாச்சான் பிள்ளை", "பிள்ளை லோகாசார்யர்", "கூர குலோத்தம தாஸர்", "திருவாய்மொழிப் பிள்ளை", "அழகிய மணவாள மாமுனிகள்", "பொன்னடிக்கால் ஜீயர்", "பொய்கையாழ்வார்", "பூதத்தாழ்வார்", "பேயாழ்வார்", "திருமழிசை ஆழ்வார்", "மதுரகவி ஆழ்வார்", "குலசேகராழ்வார்", "பெரியாழ்வார்", "ஆண்டாள்", "தொண்டரடிப்பொடி ஆழ்வார்", "திருப்பாணாழ்வார்", "திருமங்கை ஆழ்வார்"])
|
| 6 |
+
|
| 7 |
+
def get_months():
|
| 8 |
+
return sorted(["பங்குனி", "ஐப்பசி", "வைகாசி", "ஆனி", "சித்திரை", "மாசி", "ஆடி", "மார்கழி", "தை", "கார்த்திகை", "ஆவணி", "புரட்டாசி", "திருவாடிப் பூரம்"])
|
| 9 |
+
|
| 10 |
+
def get_nakshathrams():
|
| 11 |
+
return sorted(["ரேவதி", "உத்ரம்", "பூராடம்", "விசாகம்", "அனுஷம்", "கார்த்திகை", "மகம்", "உத்ராடம்", "கேட்டை", "ம்ருகசீர்ஷம்", "திருவாதிரை", "ஹஸ்தம்", "புனர்பூசம்", "ஸ்வாதி", "ரோகிணி", "திருவோணம்", "திருமூலம்", "அவிட்டம்", "ஸதயம்", "சித்திரை", "ரோஹிணி","பூரம்"])
|
| 12 |
+
|
| 13 |
+
vaazhi_thirunaamams_config = {
|
| 14 |
+
"name": "vaazhi_thirunaamams",
|
| 15 |
+
"title": "Vaazhi Thirunaamams",
|
| 16 |
+
"banner_url": convert_drive_url_to_direct(
|
| 17 |
+
"https://drive.google.com/file/d/1bGdlERDvBiO7wbOOo3cO8vYclyFYbGdk/view?usp=drive_link"
|
| 18 |
+
),
|
| 19 |
+
"category": ScriptureCategoryConstants.LITERATURE,
|
| 20 |
+
"output_dir": "./output/vaazhi_thirunaamams",
|
| 21 |
+
"collection_name": "vaazhi_thirunaamams",
|
| 22 |
+
"collection_embedding_fn": "openai",
|
| 23 |
+
|
| 24 |
+
"unit": "verse",
|
| 25 |
+
"unit_field": "_global_index",
|
| 26 |
+
|
| 27 |
+
"field_mapping": {
|
| 28 |
+
"text": "text",
|
| 29 |
+
"chapter_name": "subject",
|
| 30 |
+
"unit_index": "_global_index",
|
| 31 |
+
"relative_path": lambda doc: f"{doc.get("subject")} - {doc.get("date")}",
|
| 32 |
+
"translation" : "translation"
|
| 33 |
+
},
|
| 34 |
+
|
| 35 |
+
"metadata_fields": [
|
| 36 |
+
{
|
| 37 |
+
"name": "_global_index",
|
| 38 |
+
"datatype": "int",
|
| 39 |
+
"label": "Verse Index",
|
| 40 |
+
"description": "Absolute verse index",
|
| 41 |
+
"show_as_filter": True,
|
| 42 |
+
"is_unique": True,
|
| 43 |
+
},
|
| 44 |
+
{
|
| 45 |
+
"name": "subject",
|
| 46 |
+
"datatype": "str",
|
| 47 |
+
"label": "Chapter",
|
| 48 |
+
"description": "Chapter",
|
| 49 |
+
"show_as_filter": True,
|
| 50 |
+
"component": "dropdown",
|
| 51 |
+
"lov": lambda: get_subjects(),
|
| 52 |
+
},
|
| 53 |
+
{
|
| 54 |
+
"name": "month",
|
| 55 |
+
"datatype": "str",
|
| 56 |
+
"label": "Month",
|
| 57 |
+
"description": "Month name in Tamil",
|
| 58 |
+
"show_as_filter": True,
|
| 59 |
+
"component": "dropdown",
|
| 60 |
+
"lov": lambda: get_months(),
|
| 61 |
+
},
|
| 62 |
+
{
|
| 63 |
+
"name": "nakshathram",
|
| 64 |
+
"datatype": "str",
|
| 65 |
+
"label": "Nakshathram",
|
| 66 |
+
"description": "Nakshathram name in Tamil",
|
| 67 |
+
"show_as_filter": True,
|
| 68 |
+
"component": "dropdown",
|
| 69 |
+
"lov": lambda: get_nakshathrams(),
|
| 70 |
+
|
| 71 |
+
},
|
| 72 |
+
{
|
| 73 |
+
"name": "text",
|
| 74 |
+
"datatype": "str",
|
| 75 |
+
"label": "Tamil Verse",
|
| 76 |
+
"description": "Verse text in Tamil",
|
| 77 |
+
"show_as_filter": True,
|
| 78 |
+
},
|
| 79 |
+
],
|
| 80 |
+
|
| 81 |
+
"pdf_path": "./data/vaazhi_thirunaamams.pdf",
|
| 82 |
+
"source": "",
|
| 83 |
+
"language": "tam",
|
| 84 |
+
"example_labels": [],
|
| 85 |
+
"examples": [],
|
| 86 |
+
"llm_hints": [],
|
| 87 |
+
"credits": {"art": [], "data": [
|
| 88 |
+
{
|
| 89 |
+
"name": "koyil.org",
|
| 90 |
+
"url": "https://divyaprabandham.koyil.org/index.php/2020/12/vazhi-thirunamams-oranvazhi-intro-tamil-simple/",
|
| 91 |
+
"role": "Data provider",
|
| 92 |
+
},
|
| 93 |
+
], "audio": [], "video": []},
|
| 94 |
+
}
|