Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
| from modules.config.categories import ScriptureCategoryConstants | |
| from modules.google_drive.google_drive_utils import convert_drive_url_to_direct | |
| agnipuranam_config = { | |
| "name": "agnipuranam", | |
| "title": "Agni Puranam", | |
| "banner_url": convert_drive_url_to_direct( | |
| "https://drive.google.com/file/d/1YjOR3wLNBbNovKC01aUXHa1osbjgLYbw/view?usp=drive_link" | |
| ), | |
| "category": ScriptureCategoryConstants.PURANAM, | |
| "output_dir": "./output/agnipuranam", | |
| "collection_name": "agnipuranam", | |
| "collection_embedding_fn": "openai", | |
| "unit": "sloka", | |
| "unit_field": "_global_index", | |
| "field_mapping": { | |
| "text": "lyrics_sa", | |
| "chapter_name": "chapter_name", | |
| "unit_index": "_global_index", | |
| "relative_path": lambda doc: ( | |
| " | ".join( | |
| [ | |
| doc[key] | |
| for key in sorted( | |
| [k for k in doc.keys() if k.startswith("title_") and doc[k]], | |
| key=lambda x: int(x.split("_")[1]), | |
| ) | |
| ] | |
| ) | |
| + f" || {doc.get('_global_index', '')} ||" | |
| ), | |
| }, | |
| "metadata_fields": [ | |
| { | |
| "name": "_global_index", | |
| "datatype": "int", | |
| "label": "Verse Index", | |
| "description": "Absolute verse index", | |
| "show_as_filter": True, | |
| "is_unique": True, | |
| }, | |
| { | |
| "name": "chapter_name", | |
| "datatype": "str", | |
| "label": "Chapter", | |
| "description": "Original chapter title", | |
| "show_as_filter": True, | |
| }, | |
| { | |
| "name": "lyrics_sa", | |
| "datatype": "str", | |
| "label": "Sanskrit", | |
| "description": "Verse text in Sanskrit", | |
| }, | |
| ], | |
| "pdf_path": "./data/agnipuranam.pdf", | |
| "source": "", | |
| "language": "san", | |
| "example_labels": [], | |
| "examples": [], | |
| "llm_hints": [], | |
| "credits": { | |
| "art": [], | |
| "data": [ | |
| { | |
| "name": "Sanskritam", | |
| "url": "https://www.sanskritam.world/puranas", | |
| "role": "Data provider", | |
| }, | |
| ], | |
| "audio": [], | |
| "video": [], | |
| }, | |
| "audio_modes": {}, | |
| } | |