3v324v23's picture
bring back the app.py
ce53066
import streamlit as st
from PIL import Image
def main():
st.set_page_config(page_title="DR Assistive Tool", layout="centered")
st.markdown("<h1 style='text-align: center; color: #2E86C1;'>DR Assistive Tool</h1>", unsafe_allow_html=True)
st.markdown("""
<h4 style='text-align: center; color: grey;'>
An AI-powered assistant for early detection of Diabetic Retinopathy
</h4>
""", unsafe_allow_html=True)
st.markdown("""---""")
st.markdown("""
### 🧠 What is DR Assistive Tool?
**DR Assistive Tool** is a user-friendly web application built for early and accurate detection of **Diabetic Retinopathy (DR)**β€”a diabetes-related eye disease that can lead to blindness if not diagnosed in time. This tool uses **AI and deep learning models** trained on retinal images to help healthcare professionals, students, and researchers identify the severity stage of DR.
By simply uploading a retinal image, the model will:
- Analyze the image using advanced machine learning techniques
- Predict the stage of Diabetic Retinopathy (No DR, Mild, Moderate, Severe, Proliferative DR)
- Provide a quick, reliable, and cost-efficient second opinion for screening
The app also offers evaluation options to test the model's performance using real datasets, ensuring its credibility and practical usability.
""")
st.markdown("""
---
### πŸ›  Features:
- πŸ“€ **Upload retinal images** for DR stage prediction
- πŸ“Š **Evaluate** the model using real test datasets
- πŸ“ **View results** with interpretation and confidence score
- πŸ“ˆ **Analyze model performance** using accuracy, precision, confusion matrix, and more (in evaluation mode)
---
### πŸ“Œ How to Use:
1. Use the **sidebar** to select a feature (e.g., Predict or Evaluate).
2. In **Evaluate**, to check model accuracy.
3. In **Predict**, choose an DR image in sample images to predict or upload a high-quality retinal image (JPEG or PNG).
⚠️ *Note: This tool is not a diagnostic tool. This is an assistive tool for Doctors.*
""")
if __name__ == '__main__':
main()