{ "cells": [ { "cell_type": "code", "execution_count": 17, "id": "d42dd638", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Current directory: C:\\Users\\HP\\NitroSense-AI\n", "āœ… Created folders\n", "\n", "šŸ“ Checking team photos in: C:\\Users\\HP\\NitroSense-AI\\static\\images\\team\n", "āœ… bharath.jpg found in static/images/team/\n", "āœ… chaturvedi.jfif found in static/images/team/\n", "āœ… sneha.jpeg found in static/images/team/\n", "āœ… anu.jfif found in static/images/team/\n", "āœ… rajeev.jfif found in static/images/team/\n", "āœ… farooqi.jfif found in static/images/team/\n", "āœ… lal.jfif found in static/images/team/\n", "āœ… sanjeev.jfif found in static/images/team/\n", "āœ… rajeevphysics.jfif found in static/images/team/\n", "\n", "āœ… All team photos are in place!\n", "āœ… Created estimation.html successfully with navigation bar and continuous fertilizer input!\n", "āœ… Backup created at: C:\\Users\\HP\\NitroSense-AI\\templates\\estimation_backup.html\n" ] } ], "source": [ "# %%\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", "print(f\"āœ… Created folders\")\n", "\n", "# %% [markdown]\n", "# ### Verify team member photos (already in place)\n", "\n", "# %%\n", "# Verify team member photos are already in the correct location\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': 'static/images/team/bharath.jpg',\n", " 'chaturvedi.jfif': 'static/images/team/chaturvedi.jfif',\n", " 'sneha.jpeg': 'static/images/team/sneha.jpeg',\n", " 'anu.jfif': 'static/images/team/anu.jfif',\n", " 'rajeev.jfif': 'static/images/team/rajeev.jfif',\n", " 'farooqi.jfif': 'static/images/team/farooqi.jfif',\n", " 'lal.jfif': 'static/images/team/lal.jfif',\n", " 'sanjeev.jfif': 'static/images/team/sanjeev.jfif',\n", " 'rajeevphysics.jfif': 'static/images/team/rajeevphysics.jfif'\n", "}\n", "\n", "all_photos_present = True\n", "for filename, filepath in team_photos.items():\n", " if os.path.exists(filepath):\n", " print(f\"āœ… {filename} found in static/images/team/\")\n", " else:\n", " print(f\"āš ļø {filename} not found in static/images/team/\")\n", " all_photos_present = False\n", "\n", "if all_photos_present:\n", " print(\"\\nāœ… All team photos are in place!\")\n", "else:\n", " print(\"\\nāš ļø Some team photos are missing. Please add them to static/images/team/\")\n", "\n", "# Create navigation bar component with perfect centering on all devices\n", "nav_bar = '''\n", "\n", "\n", "\n", "\n", "\n", "'''\n", "\n", "# %%\n", "# Create estimation.html with navigation bar included - WITH CONTINUOUS FERTILIZER INPUT AND MOBILE RESPONSIVE\n", "estimation_html = f'''\n", "\n", "\n", " \n", " \n", " NitroSense AI - Nitrogen Estimation\n", " \n", " \n", " \n", "\n", "\n", " \n", "
\n", "
\n", "
\n", "
\n", " \n", "
\n", "

āš ļø Invalid Days Range

\n", "

Please select dates that result in 60 to 120 days after sowing for accurate nitrogen estimation.

\n", "

\n", " \n", "
\n", "
\n", "\n", " \n", " {nav_bar}\n", "\n", "
\n", "
\n", "
\n", "
\n", "
\n", "

\n", " \n", " Wheat Nitrogen Content Estimation\n", "

\n", "

\n", " \n", " Upload wheat leaf image and provide crop details for accurate nitrogen analysis\n", "

\n", "
\n", "
\n", "
\n", " \n", "
\n", " \n", "
\n", "
\n", "
\n", " \n", "
Upload Image
\n", "

Select from your computer

\n", " \n", "
\n", "
\n", "
\n", "
\n", " \n", "
Take Photo
\n", "

Use your camera

\n", "
\n", "
\n", "
\n", "
\n", " \n", " \n", "
\n", "\n", " \n", "
\n", " \n", "
\n", "
\n", " \n", " kg/ha\n", "
\n", "
\n", " Enter any nitrogen fertilizer application amount between 0 and 210 kg/ha (e.g., 45, 75, 135)\n", "
\n", "\n", " \n", "
\n", " \n", "
\n", "
\n", "
\n", " \n", " °C\n", "
\n", "
\n", "
\n", " Enter current air temperature in degrees Celsius (soil temperature uses mean value from training data)\n", "
\n", "\n", " \n", "
\n", "
\n", " \n", " \n", "
\n", "
\n", " \n", " \n", "
\n", "
\n", "\n", " \n", "
\n", "
0
\n", "
Days After Sowing
\n", "
Valid range: 60 - 120 days
\n", "
\n", "\n", " \n", "
\n", " \n", "
\n", "
\n", "\n", " \n", "
\n", "
\n", " Loading...\n", "
\n", "

\n", " Processing your wheat image...
\n", " This may take a few moments\n", "

\n", "
\n", "
\n", "
\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", " \n", "\n", "'''\n", "\n", "# Save the file\n", "with open(os.path.join(templates_dir, 'estimation.html'), 'w', encoding='utf-8') as f:\n", " f.write(estimation_html)\n", "print(\"āœ… Created estimation.html successfully with navigation bar and continuous fertilizer input!\")\n", "\n", "# Backup the file\n", "backup_path = os.path.join(templates_dir, 'estimation_backup.html')\n", "shutil.copy(os.path.join(templates_dir, 'estimation.html'), backup_path)\n", "print(f\"āœ… Backup created at: {backup_path}\")" ] }, { "cell_type": "code", "execution_count": null, "id": "ec315734", "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 }