{ "cells": [ { "cell_type": "code", "execution_count": 2, "id": "8d0aecd9", "metadata": { "scrolled": true }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Current directory: C:\\Users\\HP\\NitroSense-AI\n", "βœ… Created folders\n", "βœ… wheatleaf.jpg found\n", "βœ… research-flowchart.png found\n", "\n", "πŸ“ Checking logos:\n", "βœ… icar.png (ICAR logo) found\n", "βœ… iari.png (IARI logo) found\n", "βœ… iasri.jfif (IASRI logo) found\n", "βœ… iiwbr.jfif (IIWBR logo) found\n", "\n", "πŸ“ Checking team photos in: C:\\Users\\HP\\NitroSense-AI\\static\\images\\team\n", "βœ… bharath.jpg (Mr. Bharath Kumar N) found\n", "βœ… chaturvedi.jfif (Dr. K K Chaturvedi) found\n", "βœ… sneha.jpeg (Mr. Snehasis Mallik) found\n", "βœ… anu.jfif (Dr. Anu Sharma) found\n", "βœ… rajeev.jfif (Dr. Rajeev Ranjan) found\n", "βœ… farooqi.jfif (Dr. Samir Farooqi) found\n", "βœ… lal.jfif (Dr. S B Lal) found\n", "βœ… sanjeev.jfif (Dr. Sanjeev Kumar) found\n", "βœ… rajeevphysics.jfif (Dr. Rajeev Ranjan Kumar) found\n", "\n", "βœ… All 9 team photos are present!\n", "βœ… Created enhanced Home page with flowchart, research text, and flash messages\n", "βœ… Created enhanced about.html with wheat sample images\n", "βœ… Created team.html with all 9 contributors\n", "βœ… Created how-it-works.html\n", "βœ… Created contact.html with Research Focus card replacing Working Hours\n", "βœ… Created capture.html with navigation and image parameter passing\n", "βœ… Created result.html with navigation (Processing Steps removed)\n", "\n", "==================================================\n", "βœ… All HTML templates created successfully!\n", "==================================================\n", "\n", "Pages created:\n", " - Home (/) - Enhanced with flash messages, flowchart and research text\n", " - About (/about) - Added wheat sample images\n", " - Team (/team) - All 9 contributors\n", " - How It Works (/how-it-works) - Mobile responsive layout\n", " - Contact (/contact) - Research Focus card\n", " - Capture (/capture) - Improved mobile camera support with image parameter\n", " - Results (/result) - Processing Steps removed\n", "\n", "πŸ“ NOTE: Estimation page is in separate estimation_page notebook\n" ] } ], "source": [ "# %% [markdown]\n", "# # Step 7: Create HTML Templates with Navigation, Home Page Redesign, and Enhanced Pages\n", "# ## Adding Home, Estimation, About, Team, How It Works, and Contact pages\n", "\n", "# %%\n", "import os\n", "import shutil\n", "\n", "# Get current directory\n", "current_dir = os.getcwd()\n", "print(f\"Current directory: {current_dir}\")\n", "\n", "# Create templates folder if it doesn't exist\n", "templates_dir = os.path.join(current_dir, 'templates')\n", "os.makedirs(templates_dir, exist_ok=True)\n", "\n", "# Create static folder for images\n", "static_dir = os.path.join(current_dir, 'static')\n", "os.makedirs(static_dir, exist_ok=True)\n", "\n", "# Create images folder for logos and backgrounds\n", "images_dir = os.path.join(static_dir, 'images')\n", "os.makedirs(images_dir, exist_ok=True)\n", "\n", "# Create team folder for team member photos\n", "team_dir = os.path.join(images_dir, 'team')\n", "os.makedirs(team_dir, exist_ok=True)\n", "\n", "# Create wheat samples folder for about page\n", "wheat_samples_dir = os.path.join(images_dir, 'wheat-samples')\n", "os.makedirs(wheat_samples_dir, exist_ok=True)\n", "print(f\"βœ… Created folders\")\n", "\n", "# %% [markdown]\n", "# ### Verify wheat leaf background, flowchart, and logos\n", "\n", "# %%\n", "# Verify wheat leaf background\n", "wheat_bg_path = os.path.join(images_dir, 'wheatleaf.jpg')\n", "if os.path.exists(wheat_bg_path):\n", " print(f\"βœ… wheatleaf.jpg found\")\n", "else:\n", " print(f\"⚠️ wheatleaf.jpg not found - please add to static/images/\")\n", "\n", "# Verify flowchart image\n", "flowchart_path = os.path.join(images_dir, 'research-flowchart.png')\n", "if os.path.exists(flowchart_path):\n", " print(f\"βœ… research-flowchart.png found\")\n", "else:\n", " print(f\"⚠️ research-flowchart.png not found - please add to static/images/\")\n", "\n", "# Verify logos\n", "logo_paths = {\n", " 'icar.png': 'ICAR logo',\n", " 'iari.png': 'IARI logo', \n", " 'iasri.jfif': 'IASRI logo',\n", " 'iiwbr.jfif': 'IIWBR logo'\n", "}\n", "\n", "print(\"\\nπŸ“ Checking logos:\")\n", "for filename, description in logo_paths.items():\n", " filepath = os.path.join(images_dir, filename)\n", " if os.path.exists(filepath):\n", " print(f\"βœ… {filename} ({description}) found\")\n", " else:\n", " print(f\"⚠️ {filename} ({description}) not found\")\n", "\n", "# %% [markdown]\n", "# ### Verify team member photos\n", "\n", "# %%\n", "# Verify team member photos\n", "team_dir = os.path.join(images_dir, 'team')\n", "print(f\"\\nπŸ“ Checking team photos in: {team_dir}\")\n", "\n", "team_photos = {\n", " 'bharath.jpg': 'Mr. Bharath Kumar N',\n", " 'chaturvedi.jfif': 'Dr. K K Chaturvedi',\n", " 'sneha.jpeg': 'Mr. Snehasis Mallik',\n", " 'anu.jfif': 'Dr. Anu Sharma',\n", " 'rajeev.jfif': 'Dr. Rajeev Ranjan',\n", " 'farooqi.jfif': 'Dr. Samir Farooqi',\n", " 'lal.jfif': 'Dr. S B Lal',\n", " 'sanjeev.jfif': 'Dr. Sanjeev Kumar',\n", " 'rajeevphysics.jfif': 'Dr. Rajeev Ranjan Kumar'\n", "}\n", "\n", "if os.path.exists(team_dir):\n", " found_photos = []\n", " missing_photos = []\n", " \n", " for filename, description in team_photos.items():\n", " filepath = os.path.join(team_dir, filename)\n", " if os.path.exists(filepath):\n", " found_photos.append(filename)\n", " print(f\"βœ… {filename} ({description}) found\")\n", " else:\n", " missing_photos.append(filename)\n", " print(f\"⚠️ {filename} ({description}) not found\")\n", " \n", " if missing_photos:\n", " print(f\"\\n⚠️ Missing {len(missing_photos)} team photos: {', '.join(missing_photos)}\")\n", " print(\" Please add these photos to static/images/team/\")\n", " else:\n", " print(f\"\\nβœ… All {len(found_photos)} team photos are present!\")\n", "else:\n", " print(f\"❌ Directory not found: {team_dir}\")\n", " print(\" Please create this directory and add team photos\")\n", "\n", "# Create navigation bar component with perfect centering on all devices\n", "nav_bar = '''\n", "\n", "\n", "\n", "'''\n", "\n", "# Create JavaScript code that will be added to ALL pages\n", "close_menu_js = '''\n", "\n", "'''\n", "\n", "# %%\n", "# Create index.html (ENHANCED Home Page) with flash messages\n", "index_html = f'''\n", "\n", "\n", " \n", " \n", " NitroSense AI - Home\n", " \n", " \n", " \n", " \n", " \n", "\n", "\n", " \n", " {nav_bar}\n", " \n", " \n", " {{% with messages = get_flashed_messages(with_categories=true) %}}\n", " {{% if messages %}}\n", " {{% for category, message in messages %}}\n", "
\n", "
\n", " {{{{ message }}}}\n", " \n", "
\n", "
\n", " {{% endfor %}}\n", " {{% endif %}}\n", " {{% endwith %}}\n", "\n", " \n", "
\n", "
\n", "
\n", "
\n", "

🌾 NitroSense AI: Smart Nitrogen Management for Wheat

\n", "

Revolutionizing Precision Agriculture Through Multimodal Deep Learning

\n", "
\n", "
\n", "
\n", "
\n", "\n", " \n", "
\n", "
\n", " \n", "
\n", "
\n", "

\n", " Research Methodology Flowchart\n", "

\n", "
\n", " \"Research\n", "
\n", "
\n", "
\n", " \n", " \n", "
\n", "
\n", "

Wheat: A Global Staple Crop

\n", "

Wheat is one of the world's oldest and most widely cultivated cereal crops and plays a central role in global food security. Alongside rice and maize, wheat provides nearly half of the world's caloric intake and approximately two-fifths of global protein consumption. Wheat-based products serve as a primary nutritional source for more than 2.5 billion people worldwide.

\n", " \n", "

The Critical Role of Nitrogen

\n", "

Among essential macronutrients required for wheat growth, nitrogen is the most influential in determining crop development, yield, and grain protein quality. Nitrogen constitutes approximately 1–5% of plant dry matter and plays a vital role in chlorophyll formation, photosynthesis, and metabolic activity.

\n", " \n", "

Adequate nitrogen availability enhances plant morphology, biomass accumulation, and grain protein content, while deficiency restricts photosynthetic efficiency and reduces yield potential. The nitrogen fertilizer plays important role in nitrogen content in wheat leaves but excessive nitrogen application leads to environmental degradation.

\n", "
\n", "
\n", "
\n", "
\n", "\n", " \n", "
\n", "
\n", "

Study Area and Data Collection

\n", "

Field experiments were conducted at the ICAR–Indian Institute of Wheat and Barley Research (ICAR-IIWBR), Karnal, Haryana, India. Three wheat varieties (DBW-187, PBW-826, and HD-3086) were cultivated under eight nitrogen fertilizer treatments ranging from 0 to 210 kg ha⁻¹ at 30 kg increments. The experimental layout consisted of 72 plots, with 24 plots allocated per variety, systematically arranged to ensure uniform agronomic management and reliable nitrogen variability. Environmental parameters, including air temperature and soil temperature, were recorded throughout the growing season using a weather station installed at ICAR–Central Soil Salinity Research Institute (ICAR-CSSRI), Karnal.

\n", " \n", " \n", "
\n", "
\n", "
\n", "
Traditional Approach
\n", "

Traditional Methods: Kjeldahl analysis, SPAD meters, and NDVI are labor-intensive, time-consuming, and limited in scalability for real-time field monitoring.

\n", "
\n", "
\n", "
\n", "
\n", "
Artificial Intelligence (AI) Approach
\n", "

AI Approach: Deep learning offers automated, non-destructive, and real-time nitrogen estimation through advanced computer vision techniques, enabling rapid field-scale analysis without specialized equipment.

\n", "
\n", "
\n", "
\n", " \n", " \n", "
\n", "
Why Multimodal Fusion?
\n", "

Image-Only Models: Limited by visual symptoms that may appear only after significant nitrogen stress has already occurred.

\n", "

Multimodal Advantage: By combining RGB imagery with agronomic data (fertilizer levels, days after sowing, temperature), our model learns cross-modal relationships, correlating early visual symptoms with agronomic context for superior accuracy.

\n", "
\n", " \n", "
\n", " \n", " Try Nitrogen Estimation Now\n", " \n", "

Upload wheat leaf image and get instant nitrogen analysis

\n", "
\n", "
\n", "
\n", "\n", " \n", "
\n", "
\n", " \n", " Developed at ICAR-Indian Agricultural Statistics Research Institute, New Delhi, in collaboration with ICAR-Indian Institute of Wheat and Barley Research (IIWBR), Karnal, Haryana\n", " \n", "
\n", " Β© 2026 NitroSense AI - ICAR-IASRI | All Rights Reserved\n", "
\n", "
\n", "\n", " \n", "
\n", "\n", " \n", " {close_menu_js}\n", "\n", "'''\n", "\n", "# Write index.html\n", "with open(os.path.join(templates_dir, 'index.html'), 'w', encoding='utf-8') as f:\n", " f.write(index_html)\n", "print(\"βœ… Created enhanced Home page with flowchart, research text, and flash messages\")\n", "\n", "# %%\n", "# Create about.html page - ENHANCED VERSION with wheat sample images\n", "about_html = f'''\n", "\n", "\n", " \n", " \n", " NitroSense AI - About\n", " \n", " \n", " \n", " \n", "\n", "\n", " \n", " {nav_bar}\n", "\n", "
\n", "
\n", "
\n", "
\n", "
\n", "

About NitroSense AI

\n", "
\n", "
\n", " \n", " \n", "
\n", " \n", "

Revolutionizing Wheat Nitrogen Management

\n", "

An AI-powered solution for precision agriculture developed at ICAR-IASRI, New Delhi in collaboration with ICAR-IIWBR, Karnal, Haryana

\n", "
\n", " \n", " \n", "
\n", "
\n", "
\n", "

Our Mission

\n", "

To provide farmers and researchers with an accurate, non-destructive method for estimating nitrogen content in wheat crops using advanced deep learning techniques.

\n", "
\n", "
\n", "
\n", "
\n", "

Our Vision

\n", "

Enable sustainable wheat farming through precision nitrogen management, reducing fertilizer waste while maximizing crop yield.

\n", "
\n", "
\n", "
\n", "\n", " \n", "

Key Features

\n", "
\n", "
\n", "
\n", " \n", "
Image-Based Analysis
\n", "

Upload or capture wheat leaf images for instant analysis using advanced computer vision.

\n", "
\n", "
\n", "
\n", "
\n", " \n", "
Multimodal Deep Learning
\n", "

Combines image features with agronomic data for highly accurate nitrogen predictions.

\n", "
\n", "
\n", "
\n", "
\n", " \n", "
Real-Time Results
\n", "

Get instant nitrogen estimates with actionable recommendations for optimal fertilizer management.

\n", "
\n", "
\n", "
\n", "\n", " \n", "

Collaborating Institutes

\n", "
\n", "
\n", "
\n", "
ICAR-IIWBR
\n", "

ICAR-Indian Institute of Wheat and Barley Research

\n", "

Karnal, Haryana

\n", "

Leading research institute for wheat and barley improvement in India

\n", "
\n", "
\n", "
\n", "
\n", "
ICAR-IASRI
\n", "

ICAR-Indian Agricultural Statistics Research Institute

\n", "

New Delhi

\n", "

Pioneering research in agricultural statistics and computer applications

\n", "
\n", "
\n", "
\n", " \n", " \n", "
\n", "
\n", "
\n", "

2,308+

\n", "

Wheat Leaf Samples

\n", "
\n", "
\n", "

8

\n", "

Nitrogen Treatments

\n", "
\n", "
\n", "

3

\n", "

Wheat Varieties

\n", "
\n", "
\n", "
\n", " \n", "
\n", "
\n", "
\n", "
\n", "
\n", "\n", " \n", "
\n", "
\n", " ICAR-Indian Agricultural Statistics Research Institute (IASRI), New Delhi \n", " \n", "
\n", " In collaboration with ICAR-Indian Institute of Wheat and Barley Research (IIWBR), Karnal\n", "
\n", "
\n", "\n", " \n", " {close_menu_js}\n", "\n", "'''\n", "\n", "with open(os.path.join(templates_dir, 'about.html'), 'w', encoding='utf-8') as f:\n", " f.write(about_html)\n", "print(\"βœ… Created enhanced about.html with wheat sample images\")\n", "\n", "# %%\n", "# Create team.html page with all contributors\n", "team_html = f'''\n", "\n", "\n", " \n", " \n", " NitroSense AI - Our Team\n", " \n", " \n", " \n", " \n", "\n", "\n", " \n", " {nav_bar}\n", "\n", "
\n", "
\n", "
\n", "
\n", "
\n", "

Our Research Team

\n", "

Meet the dedicated researchers behind NitroSense AI

\n", "
\n", "
\n", " \n", " \n", "
\n", "

All Contributors

\n", "

A dedicated team of researchers, scientists, and scholars working together to revolutionize wheat nitrogen management through AI

\n", "
\n", " \n", " \n", "
\n", " \n", "
\n", "
\n", " \"Mr.\n", "

Mr. Bharath Kumar N

\n", "
Ph.D Scholar
\n", "
Division of Computer Application, ICAR-IASRI, New Delhi
\n", "
\n", "
\n", " \n", " \n", "
\n", "
\n", " \"Dr.\n", "

Dr. K K Chaturvedi

\n", "
Principal Scientist
\n", "
Division of Computer Application, ICAR-IASRI, New Delhi
\n", "
\n", "
\n", " \n", " \n", "
\n", "
\n", " \"Mr.\n", "

Mr. Snehasis Mallik

\n", "
Ph.D Scholar
\n", "
Division of Agricultural Bioinformatics, ICAR-IASRI, New Delhi
\n", "
\n", "
\n", " \n", " \n", "
\n", "
\n", " \"Dr.\n", "

Dr. Anu Sharma

\n", "
Senior Scientist
\n", "
Division of Computer Application, ICAR-IASRI, New Delhi
\n", "
\n", "
\n", " \n", " \n", "
\n", "
\n", " \"Dr.\n", "

Dr. Samir Farooqi

\n", "
Principal Scientist
\n", "
Division of Computer Application, ICAR-IASRI, New Delhi
\n", "
\n", "
\n", " \n", " \n", "
\n", "
\n", " \"Dr.\n", "

Dr. S B Lal

\n", "
Principal Scientist
\n", "
Division of Computer Application, ICAR-IASRI, New Delhi
\n", "
\n", "
\n", " \n", " \n", "
\n", "
\n", " \"Dr.\n", "

Dr. Rajeev Ranjan

\n", "
Scientist
\n", "
Division of Agricultural Statistics, ICAR-IASRI, New Delhi
\n", "
\n", "
\n", " \n", " \n", "
\n", "
\n", " \"Dr.\n", "

Dr. Sanjeev Kumar

\n", "
Senior Scientist
\n", "
Department of Agricultural Bioinformatics, ICAR-IASRI, New Delhi
\n", "
\n", "
\n", " \n", " \n", "
\n", "
\n", " \"Dr.\n", "

Dr. Rajeev Ranjan Kumar

\n", "
Senior Scientist
\n", "
Department of Agricultural Physics, ICAR-IARI, New Delhi
\n", "
\n", "
\n", "
\n", "\n", " \n", "
\n", " \n", " In collaboration with: ICAR-Indian Institute of Wheat and Barley Research (IIWBR), Karnal\n", "
\n", "
\n", "
\n", "
\n", "
\n", "
\n", "\n", " \n", "
\n", "
\n", " ICAR-Indian Agricultural Statistics Research Institute (IASRI) \n", "
\n", "
\n", "\n", " \n", " {close_menu_js}\n", "\n", "'''\n", "\n", "with open(os.path.join(templates_dir, 'team.html'), 'w', encoding='utf-8') as f:\n", " f.write(team_html)\n", "print(\"βœ… Created team.html with all 9 contributors\")\n", "\n", "# %%\n", "# Create how-it-works.html page with mobile-responsive layout\n", "howitworks_html = f'''\n", "\n", "\n", " \n", " \n", " NitroSense AI - How It Works\n", " \n", " \n", " \n", " \n", "\n", "\n", " \n", " {nav_bar}\n", "\n", "
\n", "
\n", "
\n", "
\n", "
\n", "

How NitroSense AI Works

\n", "

Multimodal Fusion Architecture Flow

\n", "
\n", "
\n", " \n", "
\n", " \n", " \n", "
\n", "
\n", "

πŸ“₯ Input Layer

\n", "
\n", "
\n", "
Image Input
\n", "
    \n", "
  • Wheat leaf image
  • \n", "
  • Processed through CNN Architecture
  • \n", "
  • Input size: 224x224x3
  • \n", "
\n", "
\n", "
\n", "
Tabular Input
\n", "
    \n", "
  • Nitrogen Fertilizer Level (kg/ha)
  • \n", "
  • Days After Sowing
  • \n", "
  • Current Air Temperature in Degrees Celsius
  • \n", "
\n", "
\n", "
\n", "
\n", "
\n", " \n", "
\n", " \n", " \n", "
\n", " \n", "
\n", "

πŸ–ΌοΈ Image Processing Branch

\n", "
\n", "
CNN Architecture (DenseNet121)
\n", "
    \n", "
  • Transfer learning and fine tuning
  • \n", "
  • Feature Pyramid Network (FPN)
  • \n", "
  • Extracts hierarchical features
  • \n", "
\n", "
\n", "
\n", " \n", " \n", "
\n", "

πŸ“Š Tabular Data Processing Branch

\n", "
\n", "
MLP Layer Processing
\n", "
    \n", "
  • Extracts tabular features from agronomic data
  • \n", "
  • Processes Nitrogen Level and Days
  • \n", "
  • Feature encoding and normalization
  • \n", "
\n", "
\n", "
\n", "
\n", " \n", "
\n", " \n", " \n", "
\n", "
\n", "

πŸ”„ Intermediate Fusion Layer

\n", "
\n", "
Image Features + Tabular Features β†’ Combined Vector
\n", "

✨ This fusion allows the model to learn multi-modal relationships

\n", "

πŸ”„ The network correlates visual symptoms with agronomic conditions

\n", "
\n", "
\n", "
\n", " \n", "
\n", " \n", " \n", "
\n", "
\n", "

🎯 Prediction Network

\n", "
\n", "
Dense Layers Processing
\n", "
    \n", "
  • Fused features processed through dense layers
  • \n", "
  • Final output layer with linear activation
  • \n", "
  • Output: De-Normalized Nitrogen Content
  • \n", "
\n", "
\n", "
\n", "
\n", "
\n", "\n", " \n", "
\n", "

Model Architecture Summary

\n", "
\n", "
\n", "

CNN Model: DenseNet121 with Feature Pyramid Network (FPN)

\n", "

Loss Function: Mean Squared Error (MSE)

\n", "

Evaluation Metrics: RMSE, MAE, RΒ²

\n", "
\n", "
\n", "

Input Image Size: 224Γ—224Γ—3

\n", "

Output: Nitrogen Content (2-5%)

\n", "
\n", "
\n", "
\n", "\n", " \n", "
\n", " \n", "
\n", " Why Multimodal Fusion?
\n", " By combining visual symptoms with agronomic context, the model achieves higher accuracy than either modality alone. For example, yellowing leaves might indicate deficiency, but the model also considers growth stage and fertilizer applied to make a more informed prediction.\n", "
\n", "
\n", "
\n", "
\n", "
\n", "
\n", "
\n", "\n", " \n", "
\n", "
\n", " ICAR-Indian Institute of Wheat and Barley Research (IIWBR) \n", "
\n", "
\n", "\n", " \n", " {close_menu_js}\n", "\n", "'''\n", "\n", "with open(os.path.join(templates_dir, 'how-it-works.html'), 'w', encoding='utf-8') as f:\n", " f.write(howitworks_html)\n", "print(\"βœ… Created how-it-works.html\")\n", "\n", "# %%\n", "# Create contact.html page (Updated - Removed Working Hours, Added Research Focus)\n", "contact_html = f'''\n", "\n", "\n", " \n", " \n", " NitroSense AI - Contact\n", " \n", " \n", " \n", " \n", "\n", "\n", " \n", " {nav_bar}\n", "\n", "
\n", "
\n", "
\n", "
\n", "
\n", "

Contact Us

\n", "

Get in touch with our research team

\n", "
\n", "
\n", " \n", " \n", "
\n", " \n", " ICAR-Indian Agricultural Statistics Research Institute (IASRI)\n", " \n", "
\n", " \n", "
\n", " \n", "
\n", "
\n", " \n", "

πŸ“ Address

\n", "

ICAR-Indian Agricultural Statistics Research Institute

\n", "

Pusa Campus, New Delhi

\n", "

Delhi - 110012

\n", "

Library Avenue, Pusa

\n", "
\n", "
\n", " \n", " \n", "
\n", "
\n", " \n", "

πŸ“§ Email

\n", "

Primary Contact:

\n", "

bharath.bgp123@gmail.com

\n", "

kk.chaturvedi@icar.gov.in

\n", "
\n", "
\n", " \n", " \n", "
\n", "
\n", " \n", "

πŸ“ž Phone

\n", "

Mr. Bharath Kumar N:

\n", "

+91 6362509140

\n", "

Dr. K K Chaturvedi:

\n", "

+91 8178461005

\n", "
\n", "
\n", " \n", " \n", "
\n", "
\n", " \n", "

🌱 Research Focus

\n", "

Wheat Nitrogen Management

\n", "
    \n", "
  • Multimodal Deep Learning
  • \n", "
  • Precision Agriculture
  • \n", "
  • Non-destructive Analysis
  • \n", "
  • Real-time Nitrogen Estimation
  • \n", "
  • Sustainable Farming
  • \n", "
\n", "
\n", "
\n", "
\n", " \n", " \n", "
\n", " \n", "
\n", " \n", " \n", "
\n", " \n", " \n", " \n", " \n", "
\n", " \n", " \n", "
\n", " \n", " For technical queries regarding the NitroSense AI application, please contact Mr. Bharath Kumar N or Dr. K K Chaturvedi via email or phone. We welcome collaboration opportunities in precision agriculture and deep learning research.\n", "
\n", "
\n", "
\n", "
\n", "
\n", "
\n", "\n", " \n", "
\n", "
\n", " ICAR-Indian Agricultural Statistics Research Institute (IASRI), Pusa, New Delhi \n", " \n", "
\n", " Β© 2026 NitroSense AI - All Rights Reserved\n", "
\n", "
\n", "\n", " \n", " {close_menu_js}\n", "\n", "'''\n", "\n", "with open(os.path.join(templates_dir, 'contact.html'), 'w', encoding='utf-8') as f:\n", " f.write(contact_html)\n", "print(\"βœ… Created contact.html with Research Focus card replacing Working Hours\")\n", "\n", "# %%\n", "# Create capture.html with navigation and improved mobile camera support\n", "capture_html = f'''\n", "\n", "\n", " \n", " \n", " NitroSense AI - Capture Image\n", " \n", " \n", " \n", "\n", "\n", " \n", " {nav_bar}\n", "\n", "
\n", "
\n", "
\n", "
\n", "
\n", "

Capture Wheat Leaf Image

\n", "
\n", "
\n", "
\n", " \n", "
\n", " \n", "
\n", "
Preview:
\n", " \n", "
\n", " \n", "
\n", " \n", " \n", "
\n", " \n", "
\n", " \n", " Cancel\n", "
\n", "
\n", "
\n", "
\n", "
\n", "
\n", "\n", "
\n", "
\n", " ICAR-Indian Institute of Wheat and Barley Research (IIWBR), Karnal\n", "
\n", "
\n", "\n", " \n", " \n", " {close_menu_js}\n", "\n", "'''\n", "\n", "with open(os.path.join(templates_dir, 'capture.html'), 'w', encoding='utf-8') as f:\n", " f.write(capture_html)\n", "print(\"βœ… Created capture.html with navigation and image parameter passing\")\n", "\n", "# %%\n", "# Create result.html with navigation - PROCESSING STEPS REMOVED\n", "result_html = f'''\n", "\n", "\n", " \n", " \n", " NitroSense AI - Results\n", " \n", " \n", " \n", "\n", "\n", " \n", " {nav_bar}\n", "\n", "
\n", "
\n", "
\n", "
\n", " {{% if result %}}\n", "
\n", "

Estimated Nitrogen Content

\n", "
\n", " {{{{ result.nitrogen_content }}}}\n", " %\n", "
\n", " \n", " {{% if result.classification %}}\n", "
\n", " \n", " {{{{ result.classification.message }}}}\n", " \n", "
\n", "

Recommendation: {{{{ result.classification.action }}}}

\n", " {{% endif %}}\n", " \n", "
\n", " \n", "
\n", "
\n", "
\n", " \n", "
Fertilizer Applied
\n", "

{{{{ result.fertilizer_applied }}}} kg/ha

\n", "
\n", "
\n", "
\n", "
\n", " \n", "
Days After Sowing
\n", "

{{{{ result.days }}}} days

\n", "
\n", "
\n", "
\n", "
\n", " \n", " {{% else %}}\n", "
\n", " \n", "

No Result Found

\n", "

Please complete the estimation process first.

\n", "
\n", " {{% endif %}}\n", " \n", " \n", "
\n", "
\n", "
\n", "
\n", "\n", " \n", "
\n", "
\n", " ICAR-Indian Agricultural Statistics Research Institute (IASRI) \n", "
\n", "
\n", "\n", " \n", " {close_menu_js}\n", "\n", "'''\n", "\n", "with open(os.path.join(templates_dir, 'result.html'), 'w', encoding='utf-8') as f:\n", " f.write(result_html)\n", "print(\"βœ… Created result.html with navigation (Processing Steps removed)\")\n", "\n", "# %%\n", "print(\"\\n\" + \"=\"*50)\n", "print(\"βœ… All HTML templates created successfully!\")\n", "print(\"=\"*50)\n", "print(\"\\nPages created:\")\n", "print(\" - Home (/) - Enhanced with flash messages, flowchart and research text\")\n", "print(\" - About (/about) - Added wheat sample images\")\n", "print(\" - Team (/team) - All 9 contributors\")\n", "print(\" - How It Works (/how-it-works) - Mobile responsive layout\")\n", "print(\" - Contact (/contact) - Research Focus card\")\n", "print(\" - Capture (/capture) - Improved mobile camera support with image parameter\")\n", "print(\" - Results (/result) - Processing Steps removed\")\n", "print(\"\\nπŸ“ NOTE: Estimation page is in separate estimation_page notebook\")" ] }, { "cell_type": "code", "execution_count": null, "id": "50cf4e06", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.11.5" } }, "nbformat": 4, "nbformat_minor": 5 }