Dr. Home is an AI-powered health information platform that provides evidence-based medical information from trusted sources. Built with Streamlit and powered by Perplexity AI, it offers a user-friendly interface for exploring symptoms, checking drug interactions, translating medical terms, and accessing health resources.
This platform is for educational purposes only and does not replace professional medical advice.
- Always consult healthcare professionals for medical concerns
- In emergencies, call your local emergency number immediately
- This information should not be used for self-diagnosis or treatment
- Drug interactions shown are for reference only - consult your pharmacist or doctor
- Get evidence-based information about symptoms from trusted medical sources
- Advanced filtering by age group, severity, and duration
- Comprehensive information including causes, red flags, and when to seek care
- Check potential interactions between medications
- Support for multiple drug combinations
- Detailed interaction analysis with severity ratings
- Clinical management recommendations
- Term Lookup: Translate complex medical terms into understandable language
- Document Translation: Convert medical reports into patient-friendly language
- Simple definitions with pronunciation guides
- Context and related terms
- Curated list of trusted medical sources (NIH, WHO, CDC, Mayo Clinic)
- Emergency contact information
- Health calculators (BMI, Heart Rate Zones)
- Links to official health resources
- Python 3.8 or higher
- Perplexity AI API key (Get one here)
-
Clone the repository:
git clone https://github.com/yourusername/dr-home.git cd dr-home -
Install dependencies:
pip install -r requirements.txt
-
Run the application:
streamlit run app.py
Or using the main entry point:
streamlit run main.py
-
Configure API Key:
- Open the application in your browser
- Enter your Perplexity API key in the sidebar
- Start exploring health information!
dr-home/ โโโ .gitattributes # Git configuration โโโ README.md # This file โโโ requirements.txt # Python dependencies โโโ config.py # Configuration settings โโโ api_service.py # Perplexity API service โโโ app.py # Main application (legacy) โโโ main.py # Main application entry point โโโ styles.py # CSS styles โโโ utils.py # Utility functions โโโ pages/ # Page modules โโโ __init__.py # Package initialization โโโ symptom_explorer.py # Symptom exploration functionality โโโ drug_interaction.py # Drug interaction checker โโโ medical_translator.py # Medical term translator โโโ health_resources.py # Health resources and calculators The application requires a Perplexity AI API key. You can configure it through:
- The sidebar in the web interface (recommended)
- Environment variables (for deployment)
The platform queries information from trusted sources including:
- PubMed/MEDLINE articles
- NIH (National Institutes of Health)
- WHO (World Health Organization)
- CDC (Centers for Disease Control)
- Mayo Clinic
- WebMD
- Medical journals and peer-reviewed research
The application follows a modular architecture:
config.py: Central configuration managementapi_service.py: Perplexity API integration with specialized medical queriesstyles.py: Custom CSS stylingutils.py: Utility functions for common taskspages/: Individual page modules for different features
from api_service import PerplexityService service = PerplexityService(api_key) result = service.query_symptom("headache")Custom CSS classes for consistent UI:
.main-header: Application header.warning-box: Medical disclaimers.symptom-card: Symptom information display.drug-warning: Drug interaction alerts.source-citation: Source references
- Input: Symptom description
- Filters: Age group, severity level, duration
- Output: Medical definition, causes, red flags, diagnostic approaches
- Input: Multiple medications
- Analysis: Major, moderate, and minor interactions
- Output: Severity ratings, mechanisms, management recommendations
- Term Lookup: Individual medical terms
- Document Translation: Full medical reports
- Output: Patient-friendly explanations with context
- Calculators: BMI, Heart Rate Zones
- Emergency Contacts: Region-specific emergency numbers
- Trusted Sources: Direct links to official health resources
- No personal health information is stored
- API keys are handled securely through session state
- All queries are processed through Perplexity's secure API
- No data persistence beyond the current session
streamlit run main.py- Push to GitHub repository
- Connect to Streamlit Cloud
- Configure API key in secrets
- Deploy automatically
FROM python:3.9-slim WORKDIR /app COPY requirements.txt . RUN pip install -r requirements.txt COPY . . EXPOSE 8501 CMD ["streamlit", "run", "main.py"]The application tracks basic usage statistics:
- Number of queries made per session
- Feature usage patterns
- No personal data collection
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Follow Python PEP 8 style guidelines
- Add docstrings to all functions
- Include appropriate error handling
- Test with various medical scenarios
- Ensure medical accuracy and appropriate disclaimers
This project is licensed under the MIT License - see the LICENSE file for details.
- Perplexity API has rate limits based on your plan
- The application tracks query usage
- Consider implementing caching for repeated queries
- Typical response time: 2-5 seconds
- Depends on query complexity and API response time
- Loading indicators provide user feedback
-
API Key Not Working
- Verify API key is correct
- Check Perplexity AI account status
- Ensure sufficient API credits
-
Slow Response Times
- Normal for complex medical queries
- Check internet connection
- Perplexity API may have temporary delays
-
Missing Information
- Try rephrasing the query
- Use more specific medical terms
- Check if the topic is covered by trusted sources
- Check the Issues page
- Review Perplexity AI documentation
- Contact support through GitHub issues
- Multi-language support
- Offline medical reference database
- Integration with more medical APIs
- User account system for query history
- Mobile app version
- Voice input for accessibility
- PDF report generation
- Integration with telehealth platforms
- US Emergency: 911
- EU Emergency: 112
- US Poison Control: 1-800-222-1222
- US Mental Health Crisis: 988
- Perplexity AI for providing the AI-powered search capabilities
- Streamlit for the excellent web framework
- Medical community for trusted health information sources
- Open source contributors who make projects like this possible
Remember: This tool is designed to complement, not replace, professional medical advice. Always consult with healthcare professionals for medical concerns.