Spaces:
Running
Running
Upload folder using huggingface_hub
Browse files
copy_chromadb.py
CHANGED
|
@@ -58,6 +58,11 @@ db_config = {
|
|
| 58 |
"source_collection_name": "sri_stavam",
|
| 59 |
"destination_collection_name": "sri_stavam",
|
| 60 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 61 |
}
|
| 62 |
|
| 63 |
parser = argparse.ArgumentParser(description="My app with database parameter")
|
|
|
|
| 58 |
"source_collection_name": "sri_stavam",
|
| 59 |
"destination_collection_name": "sri_stavam",
|
| 60 |
},
|
| 61 |
+
"taitriya_aranyakam": {
|
| 62 |
+
"source_db_path": "../taitriya_aranyakam_ai/chromadb_store",
|
| 63 |
+
"source_collection_name": "taitriya_aranyakam",
|
| 64 |
+
"destination_collection_name": "taitriya_aranyakam",
|
| 65 |
+
},
|
| 66 |
}
|
| 67 |
|
| 68 |
parser = argparse.ArgumentParser(description="My app with database parameter")
|
data/dropbox/scriptures/divya_prabandham/video_metadata.json
CHANGED
|
@@ -353,6 +353,12 @@
|
|
| 353 |
"video_url": "https://www.youtube.com/watch?v=1L0nh0W2t2o",
|
| 354 |
"type": "virutham"
|
| 355 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 356 |
{
|
| 357 |
"scripture": "divya_prabandham",
|
| 358 |
"global_index": 3893,
|
|
|
|
| 353 |
"video_url": "https://www.youtube.com/watch?v=1L0nh0W2t2o",
|
| 354 |
"type": "virutham"
|
| 355 |
},
|
| 356 |
+
{
|
| 357 |
+
"scripture": "divya_prabandham",
|
| 358 |
+
"global_index": 3893,
|
| 359 |
+
"video_url": "https://www.youtube.com/shorts/EZhQ7sH3u60",
|
| 360 |
+
"type": "recitation"
|
| 361 |
+
},
|
| 362 |
{
|
| 363 |
"scripture": "divya_prabandham",
|
| 364 |
"global_index": 3893,
|
modules/config/__init__.py
CHANGED
|
@@ -9,6 +9,7 @@ from modules.config.pancha_sooktham import pancha_sooktham_config
|
|
| 9 |
from modules.config.shanthi_panchakam import shanthi_panchakam_config
|
| 10 |
from modules.config.shukla_yajur_vedam import shukla_yajur_vedam_config
|
| 11 |
from modules.config.sri_stavam import sri_stavam_config
|
|
|
|
| 12 |
from modules.config.taitriya_brahmanam import taitriya_brahmanam_config
|
| 13 |
from modules.config.taitriya_samhitha import taitriya_samhitha_config
|
| 14 |
from modules.config.taitriya_upanishad import taitriya_upanishad_config
|
|
@@ -32,6 +33,7 @@ scripture_configurations = [
|
|
| 32 |
sri_stavam_config,
|
| 33 |
taitriya_brahmanam_config,
|
| 34 |
taitriya_samhitha_config,
|
|
|
|
| 35 |
taitriya_upanishad_config,
|
| 36 |
valmiki_ramayanam_config,
|
| 37 |
vishnu_puranam_config,
|
|
|
|
| 9 |
from modules.config.shanthi_panchakam import shanthi_panchakam_config
|
| 10 |
from modules.config.shukla_yajur_vedam import shukla_yajur_vedam_config
|
| 11 |
from modules.config.sri_stavam import sri_stavam_config
|
| 12 |
+
from modules.config.taitriya_aranyakam import taitriya_aranyakam_config
|
| 13 |
from modules.config.taitriya_brahmanam import taitriya_brahmanam_config
|
| 14 |
from modules.config.taitriya_samhitha import taitriya_samhitha_config
|
| 15 |
from modules.config.taitriya_upanishad import taitriya_upanishad_config
|
|
|
|
| 33 |
sri_stavam_config,
|
| 34 |
taitriya_brahmanam_config,
|
| 35 |
taitriya_samhitha_config,
|
| 36 |
+
taitriya_aranyakam_config,
|
| 37 |
taitriya_upanishad_config,
|
| 38 |
valmiki_ramayanam_config,
|
| 39 |
vishnu_puranam_config,
|
modules/config/divya_prabandham.py
CHANGED
|
@@ -94,7 +94,6 @@ divya_prabandham_config = {
|
|
| 94 |
" → Convert to: '{prabandham_code} 5.2' and pass as `title` filter.\n"
|
| 95 |
"Do NOT use `title` for general queries or keyword searches — leave it empty in those cases."
|
| 96 |
),
|
| 97 |
-
"show_as_filter": True,
|
| 98 |
},
|
| 99 |
{
|
| 100 |
"name": "verse",
|
|
|
|
| 94 |
" → Convert to: '{prabandham_code} 5.2' and pass as `title` filter.\n"
|
| 95 |
"Do NOT use `title` for general queries or keyword searches — leave it empty in those cases."
|
| 96 |
),
|
|
|
|
| 97 |
},
|
| 98 |
{
|
| 99 |
"name": "verse",
|
modules/config/taitriya_aranyakam.py
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from modules.config.categories import ScriptureCategoryConstants
|
| 2 |
+
|
| 3 |
+
|
| 4 |
+
taitriya_aranyakam_config = {
|
| 5 |
+
"name": "taitriya_aranyakam",
|
| 6 |
+
"title": "Taitriya Aranyakam",
|
| 7 |
+
"category": ScriptureCategoryConstants.VEDAM,
|
| 8 |
+
"output_dir": "./output/taitriya_aranyakam",
|
| 9 |
+
"collection_name": "taitriya_aranyakam",
|
| 10 |
+
"collection_embedding_fn": "openai",
|
| 11 |
+
"unit": "panchadhi",
|
| 12 |
+
"unit_field": "panchadhi",
|
| 13 |
+
# "chapter_order": lambda: get_chapter_order_from_taitriya_aranyakam(),
|
| 14 |
+
"field_mapping": {
|
| 15 |
+
"text": "sanskrit",
|
| 16 |
+
"unit_index": "panchadhi",
|
| 17 |
+
"transliteration": "transliteration",
|
| 18 |
+
"chapter_name": "prashnam_name",
|
| 19 |
+
"relative_path": lambda doc: (
|
| 20 |
+
"॥ तैत्तिरीय-आरण्यक ॥"
|
| 21 |
+
if not doc.get("panchadhi") or doc.get("panchadhi") == "-"
|
| 22 |
+
else f"॥ तैत्तिरीय-आरण्यक ॥ {doc.get('prashnam')}.{doc.get('anuvakam')}.{doc.get('panchadhi_index')} || {doc.get('panchadhi_sa')} ||"
|
| 23 |
+
),
|
| 24 |
+
},
|
| 25 |
+
"metadata_fields": [
|
| 26 |
+
{
|
| 27 |
+
"name": "prashnam_name",
|
| 28 |
+
"datatype": "str",
|
| 29 |
+
"label": "Prashnam Name",
|
| 30 |
+
"description": "Name of the Prashnam",
|
| 31 |
+
"show_as_filter": True,
|
| 32 |
+
"component": "dropdown",
|
| 33 |
+
"lov": lambda: [
|
| 34 |
+
"आरण्यके प्रथमः प्रश्नः १",
|
| 35 |
+
"आरण्यके द्वितीयः प्रश्नः २",
|
| 36 |
+
"आरण्यके तृतीयः प्रश्नः ३",
|
| 37 |
+
"आरण्यके चतुर्थः प्रश्नः ४",
|
| 38 |
+
"आरण्यके पञ्चमः प्रश्नः ५",
|
| 39 |
+
"आरण्यके षष्ठः प्रश्नः ६",
|
| 40 |
+
"आरण्यके सप्तमः प्रश्नः ७",
|
| 41 |
+
"आरण्यके अष्टमः प्रश्नः ८",
|
| 42 |
+
"आरण्यके नवमः प्रश्नः ९",
|
| 43 |
+
"आरण्यके दशमः प्रश्नः १०",
|
| 44 |
+
"एकाग्निकाण्डे प्रथमः प्रश्नः १",
|
| 45 |
+
"एकाग्निकाण्डे द्वितीयः प्रश्नः २",
|
| 46 |
+
],
|
| 47 |
+
"is_unique": True,
|
| 48 |
+
},
|
| 49 |
+
{
|
| 50 |
+
"name": "prashnam",
|
| 51 |
+
"datatype": "int",
|
| 52 |
+
"label": "Prashnam Number",
|
| 53 |
+
"description": "Prashnam Number",
|
| 54 |
+
"show_as_filter": True,
|
| 55 |
+
"is_unique": True,
|
| 56 |
+
},
|
| 57 |
+
{
|
| 58 |
+
"name": "anuvakam",
|
| 59 |
+
"datatype": "int",
|
| 60 |
+
"label": "Anuvakam Number",
|
| 61 |
+
"description": "Anuvakam Number",
|
| 62 |
+
"show_as_filter": True,
|
| 63 |
+
"is_unique": True,
|
| 64 |
+
},
|
| 65 |
+
{
|
| 66 |
+
"name": "panchadhi_index",
|
| 67 |
+
"datatype": "int",
|
| 68 |
+
"label": "Relative Panchadhi Number",
|
| 69 |
+
"description": "Relative Panchadhi Number",
|
| 70 |
+
"show_as_filter": True,
|
| 71 |
+
"is_unique": True,
|
| 72 |
+
},
|
| 73 |
+
{
|
| 74 |
+
"name": "panchadhi",
|
| 75 |
+
"datatype": "int",
|
| 76 |
+
"label": "Absolute Panchadhi Number",
|
| 77 |
+
"description": "Absolute Panchadhi Number",
|
| 78 |
+
"show_as_filter": True,
|
| 79 |
+
"is_unique": True,
|
| 80 |
+
},
|
| 81 |
+
{
|
| 82 |
+
"name": "sanskrit",
|
| 83 |
+
"label": "Lyrics in sanskrit",
|
| 84 |
+
"datatype": "str",
|
| 85 |
+
"description": "The original sloka in sanskrit.",
|
| 86 |
+
},
|
| 87 |
+
{
|
| 88 |
+
"name": "transliteration",
|
| 89 |
+
"label": "Transliteration in english",
|
| 90 |
+
"datatype": "str",
|
| 91 |
+
"description": "The original sloka transliterated in English.",
|
| 92 |
+
},
|
| 93 |
+
],
|
| 94 |
+
"pdf_path": "./data/taitriya_aranyakam.pdf",
|
| 95 |
+
"source": "https://sanskritdocuments.org/doc_veda/taittirIyaAraNyaka.html",
|
| 96 |
+
"language": "san+eng",
|
| 97 |
+
"example_labels": [
|
| 98 |
+
"Taitriya AraNyaka",
|
| 99 |
+
],
|
| 100 |
+
"examples": [
|
| 101 |
+
"Show some verses from Taitriya AraNyaka",
|
| 102 |
+
],
|
| 103 |
+
"llm_hints": [],
|
| 104 |
+
}
|