{ "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", "Please select dates that result in 60 to 120 days after sowing for accurate nitrogen estimation.
\n", " \n", " \n", "\n", " \n", " Upload wheat leaf image and provide crop details for accurate nitrogen analysis\n", "
\n", "\n",
" Processing your wheat image...
\n",
" This may take a few moments\n",
"