AI Doctor is an advanced image-based medical assistant powered by Groq's AI models. It allows users to upload medical images and query AI models for insights. The system leverages Llama-3.2 models to provide responses based on image analysis and textual queries.
- Upload medical images and get AI-generated insights
- Uses Groq's Llama-3.2 models for vision-based inference
- FastAPI-based backend with a web interface
- Supports multiple AI models for better accuracy
- Error handling and logging for better debugging
- FastAPI for the web server
- Python for backend scripting
- Jinja2 for rendering HTML templates
- Pillow for image processing
- Requests for making API calls
- Logging for debugging and error tracking
- Groq API for AI-powered analysis
- Python 3.10+
- Virtual environment (optional but recommended)
- Clone the repository:
git clone https://github.com/djdhairya/AI-Doctor.git cd Ai-Doctor - Create a
.envfile and add your Groq API key:GROQ_API_KEY=your_api_key_here
Run the FastAPI server:
uvicorn app:app --host 0.0.0.0 --port 8000 --reloadAccess the web interface at:
http://localhost:8000
To process an image using main.py, update the image path and query in the script, then run:
python main.py- Renders the web interface for image upload and querying.
- Accepts an image and a text query.
- Returns AI-generated insights from Groq's models.
- Open
http://localhost:8000 - Upload an image
- Enter a query (e.g., "What does this X-ray indicate?")
- Click submit to receive AI-generated insights
Modify main.py to specify your image path and query:
image_path = "path/to/your/image.png"
query = "What is shown in this image?"Run:
python main.py- Ensures the image is valid before processing
- Logs errors for debugging
- Handles API failures with appropriate messages
- Integration with more AI models
- Support for multiple image formats
- Enhanced UI for better user experience
This project is licensed under the MIT License.

