Spaces:
Sleeping
Sleeping
File size: 3,925 Bytes
b3d3a90 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
# Commercial Real Estate Knowledge Assistant
![Commercial Lending 101](Dataset/commercial-lending-101.png)
A sophisticated Retrieval-Augmented Generation (RAG) chatbot that transforms how professionals understand commercial real estate concepts. Built with Azure OpenAI and modern Python technologies, this assistant processes commercial real estate documentation and provides accurate, context-aware answers to your questions.
## π Deployments
- **Live Demo**: [Try it on Hugging Face Spaces](https://huggingface.co/spaces/tony-42069/cre-chatbot-rag)
## π Key Features
- **Multi-Document Support**: Process and analyze multiple PDF documents simultaneously
- **Intelligent PDF Processing**: Advanced document analysis and text extraction
- **Azure OpenAI Integration**: Leveraging GPT-3.5 Turbo for accurate, contextual responses
- **Semantic Search**: Using Azure OpenAI embeddings for precise context retrieval
- **Vector Storage**: Efficient document indexing with ChromaDB
- **Modern UI**: Beautiful chat interface with message history and source tracking
- **Enterprise-Ready**: Comprehensive logging and error handling
## π― Use Cases
- **Training & Education**: Help new CRE professionals understand industry concepts
- **Quick Reference**: Instant access to definitions and explanations
- **Document Analysis**: Extract insights from CRE documentation
- **Knowledge Base**: Build and query your own CRE knowledge repository
## π Quick Start
### Prerequisites
- Python 3.8+
- Azure OpenAI Service access with:
- `gpt-35-turbo` model deployment
- `text-embedding-ada-002` model deployment
### Installation
1. Clone the repository:
```bash
git clone https://github.com/tony-42069/cre-chatbot-rag.git
cd cre-chatbot-rag
```
2. Create and activate virtual environment:
```bash
python -m venv venv
venv\Scripts\activate
```
3. Install dependencies:
```bash
pip install -r requirements.txt
```
4. Create `.env` file with Azure OpenAI credentials:
```env
AZURE_OPENAI_ENDPOINT=your_endpoint_here
AZURE_OPENAI_KEY=your_key_here
AZURE_OPENAI_DEPLOYMENT_NAME=your_gpt_deployment_name
AZURE_OPENAI_EMBEDDING_DEPLOYMENT_NAME=text-embedding-ada-002
```
5. Run the application:
```bash
streamlit run app/main.py
```
## π Embedding
To embed this chatbot in your website, use the following HTML code:
```html
<iframe
src="https://tony-42069-cre-chatbot-rag.hf.space"
frameborder="0"
width="850px"
height="450px"
></iframe>
```
## π‘ Features
### Modern Chat Interface
- Clean, professional design
- Persistent chat history
- Source context tracking
- Multiple document management
- Real-time processing feedback
### Advanced RAG Implementation
- Semantic chunking of documents
- Azure OpenAI embeddings for accurate retrieval
- Context-aware answer generation
- Multi-document knowledge base
- Source attribution for answers
### Enterprise Security
- Secure credential management
- Azure OpenAI integration
- Local vector storage with ChromaDB
- Comprehensive error handling
- Detailed logging system
## π οΈ Technical Stack
- **Frontend**: Streamlit
- **Language Models**: Azure OpenAI (GPT-3.5 Turbo)
- **Embeddings**: Azure OpenAI (text-embedding-ada-002)
- **Vector Store**: ChromaDB
- **PDF Processing**: PyPDF2
- **Framework**: LangChain
## π Documentation
- [Azure OpenAI Service](https://azure.microsoft.com/en-us/products/cognitive-services/openai-service/)
- [Streamlit](https://streamlit.io/)
- [LangChain](https://python.langchain.com/)
- [ChromaDB](https://www.trychroma.com/)
## π€ Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
## π License
This project is licensed under the MIT License - see the LICENSE file for details.
## π Acknowledgments
- Azure OpenAI team for providing the powerful language models
- LangChain community for the excellent RAG framework
- Streamlit team for the amazing web framework
|