CoolFace
Apppublic

shrini2305/CoTrust

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes
App README

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference

DPDPA UI Application

A Streamlit-based interactive Q&A assistant for understanding India's Digital Personal Data Protection Act (DPDPA). This application provides both simple and detailed explanations of DPDPA-related queries using AI-powered agents and knowledge base integration.

Features

  • โ€”๐Ÿค– AI-powered DPDPA expert assistant
  • โ€”๐ŸŒ Real-time internet search capabilities for latest updates
  • โ€”๐Ÿ’ก Dual response modes:
  • โ€”Simple Mode: Clear, concise explanations
  • โ€”Detailed Mode: Comprehensive, in-depth analysis
  • โ€”๐Ÿ“š Integrated knowledge base using ChromaDB
  • โ€”๐Ÿ” Source attribution and reference tracking
  • โ€”๐Ÿ’ฌ Interactive chat interface

Prerequisites

  • โ€”Python 3.7+
  • โ€”ChromaDB
  • โ€”Streamlit
  • โ€”Agno Framework and its dependencies
  • โ€”OpenAI API key

Installation

  1. 1.Clone the repository:
bash
git clone [repository-url]
cd dpdpa-ui-application
  1. 1.Install required dependencies:
bash
pip install -r requirements.txt
  1. 1.Ensure ChromaDB is properly configured with the collection:
python
COLLECTION_NAME = "dpdpa_knowledge_lc_final_v5"
CHROMA_PERSIST_DIR = "./dpdpa_chroma_lc_final_v5"

Usage

  1. 1.Start the application:
bash
streamlit run dpdpa_streamlit_lite.py
  1. 1.Access the web interface through your browser (typically http://localhost:8501)
  1. 1.Use the interface to:
  2. 2.Ask questions about DPDPA
  3. 3.Toggle between Simple and Detailed response modes
  4. 4.View source references
  5. 5.Access internet search for latest updates
  6. 6.Clear chat history as needed

Project Structure

DPDPA UI Application/
โ”œโ”€โ”€ dpdpa_streamlit_lite.py  # Main application file
โ”œโ”€โ”€ dpdpa_chroma_lc_final_v5/  # ChromaDB persistence directory
โ””โ”€โ”€ requirements.txt  # Project dependencies

Features in Detail

AI Agents

  1. 1.DPDPA Expert Agent
  2. 2.Provides clear explanations of DPDPA concepts
  3. 3.Uses structured response format with headers
  4. 4.Includes source citations
  1. 1.Internet Search Agent
  2. 2.Fetches latest DPDPA updates
  3. 3.Provides web-sourced information
  4. 4.Includes source URLs and dates

Response Modes

  1. 1.Simple Mode
  2. 2.Clear, 1-sentence summaries
  3. 3.Structured explanations
  4. 4.Practical implications
  5. 5."In Simple Terms" summary
  1. 1.Detailed Mode
  2. 2.Comprehensive analysis
  3. 3.Multiple sub-sections
  4. 4.Technical details
  5. 5.Regulatory nuances

Security and Disclaimers

  • โ€”The application is for informational purposes only
  • โ€”Not a substitute for professional legal advice
  • โ€”Always verify critical legal information
  • โ€”Consult qualified legal experts for specific DPDPA compliance guidance

Contributing

Contributions are welcome! Please feel free to submit pull requests.