mohpython-vertex-ai / index.html
mohpython's picture
undefined - Initial Deployment
2ce4541 verified
raw
history blame
32.3 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Image Classification with Vertex AI – Step-by-Step Guide</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/styles/atom-one-dark.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/highlight.min.js"></script>
<script src="https://kit.fontawesome.com/3a5a3f1b9a.js" crossorigin="anonymous"></script>
<style>
.dark-mode {
background-color: #1a202c;
color: #f7fafc;
}
.dark-mode .card {
background-color: #2d3748;
border-color: #4a5568;
}
.dark-mode .navbar {
background-color: #2d3748;
border-color: #4a5568;
}
.dark-mode .footer {
background-color: #2d3748;
border-color: #4a5568;
}
.dark-mode .code-block {
background-color: #282c34;
}
.dark-mode .section-icon {
color: #63b3ed;
}
</style>
</head>
<body class="bg-gray-50 text-gray-800 font-sans">
<!-- Navigation -->
<nav class="navbar bg-white shadow-sm sticky top-0 z-50">
<div class="container mx-auto px-4 py-3 flex justify-between items-center">
<div class="flex items-center space-x-2">
<i class="fas fa-robot text-blue-500 text-2xl"></i>
<span class="text-xl font-bold">Vertex AI Guide</span>
</div>
<div class="flex items-center space-x-4">
<a href="#home" class="hover:text-blue-500">Home</a>
<a href="#prerequisites" class="hover:text-blue-500">Prerequisites</a>
<a href="#tutorial" class="hover:text-blue-500">Tutorial</a>
<a href="#resources" class="hover:text-blue-500">Resources</a>
<button id="darkModeToggle" class="p-2 rounded-full hover:bg-gray-200 dark-mode:hover:bg-gray-700">
<i class="fas fa-moon"></i>
</button>
</div>
</div>
</nav>
<!-- Hero Section -->
<section id="home" class="py-16 bg-gradient-to-r from-blue-50 to-indigo-50 dark-mode:from-gray-800 dark-mode:to-gray-900">
<div class="container mx-auto px-4">
<div class="max-w-4xl mx-auto text-center">
<h1 class="text-4xl md:text-5xl font-bold mb-6">Image Classification with Vertex AI</h1>
<p class="text-xl mb-8">A step-by-step guide to training and deploying image classification models using Google Vertex AI AutoML Vision</p>
<div class="flex justify-center space-x-4">
<a href="#tutorial" class="bg-blue-500 hover:bg-blue-600 text-white px-6 py-3 rounded-lg font-medium">Start Tutorial</a>
<a href="#prerequisites" class="bg-gray-200 hover:bg-gray-300 dark-mode:bg-gray-700 dark-mode:hover:bg-gray-600 text-gray-800 dark-mode:text-gray-200 px-6 py-3 rounded-lg font-medium">Prerequisites</a>
</div>
</div>
</div>
</section>
<!-- Introduction -->
<section class="py-12">
<div class="container mx-auto px-4">
<div class="max-w-3xl mx-auto">
<div class="card bg-white p-8 rounded-lg shadow-sm border border-gray-200 mb-8">
<h2 class="text-2xl font-bold mb-4">Welcome to the Guide!</h2>
<p class="mb-4">This tutorial is designed for developers, data scientists, and students who want to learn how to build image classification models without deep machine learning expertise.</p>
<p class="mb-4">We'll use Google Vertex AI's AutoML Vision, which automates much of the model training process while still delivering high-quality results. No need to write complex neural network architectures!</p>
<p>By the end of this guide, you'll be able to:</p>
<ul class="list-disc pl-6 mt-2 space-y-1">
<li>Prepare image datasets for classification</li>
<li>Train custom models with AutoML Vision</li>
<li>Evaluate model performance</li>
<li>Deploy models to production endpoints</li>
<li>Make predictions using the Python SDK</li>
</ul>
</div>
</div>
</div>
</section>
<!-- Prerequisites -->
<section id="prerequisites" class="py-12 bg-gray-50 dark-mode:bg-gray-900">
<div class="container mx-auto px-4">
<div class="max-w-4xl mx-auto">
<div class="flex items-center mb-8">
<i class="fas fa-clipboard-check section-icon text-3xl mr-4"></i>
<h2 class="text-3xl font-bold">Prerequisites</h2>
</div>
<div class="grid md:grid-cols-2 gap-6">
<div class="card bg-white p-6 rounded-lg shadow-sm border border-gray-200">
<h3 class="text-xl font-semibold mb-3 flex items-center">
<i class="fas fa-cloud mr-2 text-blue-500"></i> Google Cloud Account
</h3>
<p>You'll need a Google Cloud account with billing enabled. Vertex AI is a paid service, but new users get $300 in free credits.</p>
</div>
<div class="card bg-white p-6 rounded-lg shadow-sm border border-gray-200">
<h3 class="text-xl font-semibold mb-3 flex items-center">
<i class="fas fa-project-diagram mr-2 text-blue-500"></i> Google Cloud Project
</h3>
<p>Create a new project or select an existing one in the Google Cloud Console where you'll enable the Vertex AI API.</p>
</div>
<div class="card bg-white p-6 rounded-lg shadow-sm border border-gray-200">
<h3 class="text-xl font-semibold mb-3 flex items-center">
<i class="fas fa-plug mr-2 text-blue-500"></i> Vertex AI API Enabled
</h3>
<p>Enable the Vertex AI API for your project. This can be done in the "APIs & Services" section of the Cloud Console.</p>
</div>
<div class="card bg-white p-6 rounded-lg shadow-sm border border-gray-200">
<h3 class="text-xl font-semibold mb-3 flex items-center">
<i class="fas fa-database mr-2 text-blue-500"></i> Cloud Storage Bucket
</h3>
<p>Create a Cloud Storage bucket to store your training data. The bucket should be in the same region where you'll train your model.</p>
</div>
<div class="card bg-white p-6 rounded-lg shadow-sm border border-gray-200">
<h3 class="text-xl font-semibold mb-3 flex items-center">
<i class="fas fa-code mr-2 text-blue-500"></i> Python Environment
</h3>
<p>Set up a Python environment (3.7+) with the Google Cloud SDK installed. We recommend using a virtual environment.</p>
</div>
<div class="card bg-white p-6 rounded-lg shadow-sm border border-gray-200">
<h3 class="text-xl font-semibold mb-3 flex items-center">
<i class="fas fa-key mr-2 text-blue-500"></i> Authentication
</h3>
<p>Set up authentication by creating a service account and downloading the JSON key file. Set the GOOGLE_APPLICATION_CREDENTIALS environment variable.</p>
</div>
</div>
<div class="mt-8 card bg-white p-6 rounded-lg shadow-sm border border-gray-200">
<h3 class="text-xl font-semibold mb-3">Install Required Packages</h3>
<p class="mb-4">Install the Google Cloud Vertex AI SDK and other required packages:</p>
<pre class="code-block bg-gray-100 p-4 rounded-lg overflow-x-auto"><code class="language-bash">pip install google-cloud-aiplatform pandas</code></pre>
</div>
</div>
</div>
</section>
<!-- Tutorial Steps -->
<section id="tutorial" class="py-12">
<div class="container mx-auto px-4">
<div class="max-w-4xl mx-auto">
<div class="flex items-center mb-8">
<i class="fas fa-graduation-cap section-icon text-3xl mr-4"></i>
<h2 class="text-3xl font-bold">Step-by-Step Tutorial</h2>
</div>
<!-- Step 1 -->
<div class="card bg-white p-6 rounded-lg shadow-sm border border-gray-200 mb-8">
<div class="flex items-center mb-4">
<div class="bg-blue-500 text-white rounded-full w-8 h-8 flex items-center justify-center mr-3">1</div>
<h3 class="text-2xl font-semibold">Dataset Preparation</h3>
</div>
<p class="mb-4">For image classification with AutoML Vision, your dataset needs to be structured in a specific way:</p>
<div class="mb-4">
<h4 class="font-semibold mb-2">Folder Structure:</h4>
<pre class="code-block bg-gray-100 p-4 rounded-lg overflow-x-auto"><code class="language-plaintext">gs://your-bucket-name/
├── train/
│ ├── class1/
│ │ ├── image1.jpg
│ │ ├── image2.jpg
│ │ └── ...
│ ├── class2/
│ │ ├── image1.jpg
│ │ ├── image2.jpg
│ │ └── ...
│ └── ...
└── test/
├── class1/
├── class2/
└── ...</code></pre>
</div>
<div class="mb-4">
<h4 class="font-semibold mb-2">Requirements:</h4>
<ul class="list-disc pl-6 space-y-1">
<li>Minimum 10 images per class (100+ recommended for better performance)</li>
<li>Images should be in JPEG or PNG format</li>
<li>Each image should be at least 800x600 pixels</li>
<li>Balance your dataset across classes</li>
</ul>
</div>
<div>
<h4 class="font-semibold mb-2">Upload to Cloud Storage:</h4>
<p>Use the Google Cloud Console or gsutil command-line tool to upload your dataset:</p>
<pre class="code-block bg-gray-100 p-4 rounded-lg overflow-x-auto mt-2"><code class="language-bash">gsutil -m cp -r /path/to/local/dataset gs://your-bucket-name</code></pre>
</div>
</div>
<!-- Step 2 -->
<div class="card bg-white p-6 rounded-lg shadow-sm border border-gray-200 mb-8">
<div class="flex items-center mb-4">
<div class="bg-blue-500 text-white rounded-full w-8 h-8 flex items-center justify-center mr-3">2</div>
<h3 class="text-2xl font-semibold">Create a Vertex AI Dataset</h3>
</div>
<p class="mb-4">Now we'll create a dataset resource in Vertex AI that points to your Cloud Storage data.</p>
<div class="mb-4">
<h4 class="font-semibold mb-2">Using the Python SDK:</h4>
<pre class="code-block bg-gray-100 p-4 rounded-lg overflow-x-auto"><code class="language-python">from google.cloud import aiplatform
# Initialize the Vertex AI client
aiplatform.init(project="your-project-id", location="us-central1")
# Create an image dataset
dataset = aiplatform.ImageDataset.create(
display_name="flowers-classification",
gcs_source="gs://your-bucket-name/train/**",
import_schema_uri=aiplatform.schema.dataset.ioformat.image.classification.single_label,
)
print(f"Created dataset: {dataset.resource_name}")</code></pre>
</div>
<div>
<h4 class="font-semibold mb-2">Alternative: Using the Console</h4>
<ol class="list-decimal pl-6 space-y-1">
<li>Go to the Vertex AI section in Google Cloud Console</li>
<li>Navigate to "Datasets" and click "Create"</li>
<li>Select "Image classification (Single-label)"</li>
<li>Enter a name and select your region</li>
<li>Choose "Select import files from Cloud Storage" and enter your path (gs://your-bucket-name/train/**)</li>
<li>Click "Create"</li>
</ol>
</div>
</div>
<!-- Step 3 -->
<div class="card bg-white p-6 rounded-lg shadow-sm border border-gray-200 mb-8">
<div class="flex items-center mb-4">
<div class="bg-blue-500 text-white rounded-full w-8 h-8 flex items-center justify-center mr-3">3</div>
<h3 class="text-2xl font-semibold">Train the AutoML Model</h3>
</div>
<p class="mb-4">With your dataset ready, you can now train an AutoML Vision model. This process will automatically:</p>
<ul class="list-disc pl-6 mb-4 space-y-1">
<li>Split your data into training/validation sets</li>
<li>Select the best model architecture</li>
<li>Tune hyperparameters</li>
<li>Train and evaluate the model</li>
</ul>
<div class="mb-4">
<h4 class="font-semibold mb-2">Using the Python SDK:</h4>
<pre class="code-block bg-gray-100 p-4 rounded-lg overflow-x-auto"><code class="language-python"># Define training job
training_job = aiplatform.AutoMLImageTrainingJob(
display_name="train-flowers-classification",
prediction_type="classification",
multi_label=False,
model_type="CLOUD",
)
# Run the training job
model = training_job.run(
dataset=dataset,
training_fraction_split=0.8,
validation_fraction_split=0.1,
test_fraction_split=0.1,
budget_milli_node_hours=8000, # 8 compute hours
disable_early_stopping=False,
)
print(f"Training completed. Model: {model.resource_name}")</code></pre>
</div>
<div>
<h4 class="font-semibold mb-2">Training Considerations:</h4>
<ul class="list-disc pl-6 space-y-1">
<li><strong>Budget:</strong> More compute hours generally lead to better models (default is 8 hours)</li>
<li><strong>Model Type:</strong> "CLOUD" for best accuracy, "MOBILE" for edge deployment</li>
<li><strong>Monitoring:</strong> Track progress in the Vertex AI Console</li>
</ul>
</div>
</div>
<!-- Step 4 -->
<div class="card bg-white p-6 rounded-lg shadow-sm border border-gray-200 mb-8">
<div class="flex items-center mb-4">
<div class="bg-blue-500 text-white rounded-full w-8 h-8 flex items-center justify-center mr-3">4</div>
<h3 class="text-2xl font-semibold">Evaluate the Model</h3>
</div>
<p class="mb-4">After training completes, you'll want to evaluate the model's performance before deployment.</p>
<div class="mb-4">
<h4 class="font-semibold mb-2">View Evaluation Metrics:</h4>
<pre class="code-block bg-gray-100 p-4 rounded-lg overflow-x-auto"><code class="language-python"># Get evaluation metrics
evaluation = model.evaluate()
print("Model evaluation metrics:")
print(f"Precision: {evaluation.metrics['precision']}")
print(f"Recall: {evaluation.metrics['recall']}")
print(f"F1 Score: {evaluation.metrics['f1Score']}")
print(f"Confusion Matrix: {evaluation.metrics['confusionMatrix']}")</code></pre>
</div>
<div class="mb-4">
<h4 class="font-semibold mb-2">Key Metrics to Check:</h4>
<ul class="list-disc pl-6 space-y-1">
<li><strong>Precision:</strong> Percentage of correct positive predictions</li>
<li><strong>Recall:</strong> Percentage of actual positives correctly identified</li>
<li><strong>F1 Score:</strong> Harmonic mean of precision and recall</li>
<li><strong>Confusion Matrix:</strong> Shows performance per class</li>
</ul>
</div>
<div>
<h4 class="font-semibold mb-2">Console Visualization:</h4>
<p>For a more visual evaluation, check the "Evaluate" tab in the Vertex AI Console where you can see:</p>
<ul class="list-disc pl-6 space-y-1">
<li>Precision-recall curves</li>
<li>Confusion matrix visualization</li>
<li>Example predictions with confidence scores</li>
</ul>
</div>
</div>
<!-- Step 5 -->
<div class="card bg-white p-6 rounded-lg shadow-sm border border-gray-200 mb-8">
<div class="flex items-center mb-4">
<div class="bg-blue-500 text-white rounded-full w-8 h-8 flex items-center justify-center mr-3">5</div>
<h3 class="text-2xl font-semibold">Deploy the Model</h3>
</div>
<p class="mb-4">To make predictions, you need to deploy your model to an endpoint. This creates a scalable service that can handle prediction requests.</p>
<div class="mb-4">
<h4 class="font-semibold mb-2">Using the Python SDK:</h4>
<pre class="code-block bg-gray-100 p-4 rounded-lg overflow-x-auto"><code class="language-python"># Create an endpoint
endpoint = aiplatform.Endpoint.create(
display_name="flowers-classification-endpoint",
project="your-project-id",
location="us-central1",
)
# Deploy the model to the endpoint
endpoint.deploy(
model=model,
deployed_model_display_name="flowers-classification-model",
traffic_percentage=100,
machine_type="n1-standard-4", # Choose appropriate machine type
min_replica_count=1,
max_replica_count=1,
)
print(f"Model deployed to endpoint: {endpoint.resource_name}")</code></pre>
</div>
<div>
<h4 class="font-semibold mb-2">Deployment Considerations:</h4>
<ul class="list-disc pl-6 space-y-1">
<li><strong>Machine Type:</strong> Choose based on expected traffic (n1-standard-2 for testing, larger for production)</li>
<li><strong>Scaling:</strong> Set min/max replicas for automatic scaling</li>
<li><strong>Cost:</strong> You're billed while the endpoint is running</li>
<li><strong>Undeploy:</strong> Remember to undeploy when not in use to avoid charges</li>
</ul>
</div>
</div>
<!-- Step 6 -->
<div class="card bg-white p-6 rounded-lg shadow-sm border border-gray-200">
<div class="flex items-center mb-4">
<div class="bg-blue-500 text-white rounded-full w-8 h-8 flex items-center justify-center mr-3">6</div>
<h3 class="text-2xl font-semibold">Make Predictions</h3>
</div>
<p class="mb-4">With your model deployed to an endpoint, you can now make predictions on new images.</p>
<div class="mb-4">
<h4 class="font-semibold mb-2">Using the Python SDK:</h4>
<pre class="code-block bg-gray-100 p-4 rounded-lg overflow-x-auto"><code class="language-python">import base64
# Function to encode image
def encode_image(image_path):
with open(image_path, "rb") as image_file:
return base64.b64encode(image_file.read()).decode("utf-8")
# Example prediction
image_path = "path/to/your/test_image.jpg"
encoded_image = encode_image(image_path)
# Make prediction
prediction = endpoint.predict(
instances=[{"content": encoded_image}],
parameters={"confidenceThreshold": 0.5}, # Minimum confidence score
)
# Process results
for result in prediction.predictions:
print("Predicted classes:")
for i, (label, score) in enumerate(zip(result["displayNames"], result["confidences"])):
print(f"{i+1}. {label}: {score:.2%}")</code></pre>
</div>
<div class="mb-4">
<h4 class="font-semibold mb-2">Alternative: Batch Prediction</h4>
<p>For predicting on many images at once, use batch prediction:</p>
<pre class="code-block bg-gray-100 p-4 rounded-lg overflow-x-auto"><code class="language-python"># Create batch prediction job
batch_job = model.batch_predict(
job_display_name="batch-pred-flowers",
gcs_source="gs://your-bucket-name/test/**",
gcs_destination_prefix="gs://your-bucket-name/predictions/",
instances_format="jsonl",
predictions_format="jsonl",
)
print(f"Batch prediction job: {batch_job.resource_name}")</code></pre>
</div>
<div>
<h4 class="font-semibold mb-2">Prediction Options:</h4>
<ul class="list-disc pl-6 space-y-1">
<li><strong>Online Prediction:</strong> Low-latency requests to the endpoint (good for real-time applications)</li>
<li><strong>Batch Prediction:</strong> Process many images at once (good for offline processing)</li>
<li><strong>Confidence Threshold:</strong> Filter predictions by minimum confidence score</li>
</ul>
</div>
</div>
</div>
</div>
</section>
<!-- Useful Resources -->
<section id="resources" class="py-12 bg-gray-50 dark-mode:bg-gray-900">
<div class="container mx-auto px-4">
<div class="max-w-4xl mx-auto">
<div class="flex items-center mb-8">
<i class="fas fa-book section-icon text-3xl mr-4"></i>
<h2 class="text-3xl font-bold">Useful Resources</h2>
</div>
<div class="grid md:grid-cols-2 gap-6">
<div class="card bg-white p-6 rounded-lg shadow-sm border border-gray-200">
<h3 class="text-xl font-semibold mb-3 flex items-center">
<i class="fas fa-file-alt mr-2 text-blue-500"></i> Official Documentation
</h3>
<ul class="space-y-2">
<li><a href="https://cloud.google.com/vertex-ai" class="text-blue-500 hover:underline" target="_blank">Vertex AI Documentation</a></li>
<li><a href="https://cloud.google.com/vision/automl/docs" class="text-blue-500 hover:underline" target="_blank">AutoML Vision Documentation</a></li>
<li><a href="https://cloud.google.com/python/docs/reference/aiplatform/latest" class="text-blue-500 hover:underline" target="_blank">Python SDK Reference</a></li>
</ul>
</div>
<div class="card bg-white p-6 rounded-lg shadow-sm border border-gray-200">
<h3 class="text-xl font-semibold mb-3 flex items-center">
<i class="fas fa-video mr-2 text-blue-500"></i> Tutorials & Videos
</h3>
<ul class="space-y-2">
<li><a href="https://www.youtube.com/watch?v=zTz8w7Z8Q8I" class="text-blue-500 hover:underline" target="_blank">Vertex AI AutoML Vision Demo</a></li>
<li><a href="https://cloud.google.com/blog/topics/developers-practitioners/getting-started-vertex-ai" class="text-blue-500 hover:underline" target="_blank">Getting Started with Vertex AI</a></li>
<li><a href="https://cloud.google.com/ai-platform-unified/docs/tutorials" class="text-blue-500 hover:underline" target="_blank">Official Tutorials</a></li>
</ul>
</div>
<div class="card bg-white p-6 rounded-lg shadow-sm border border-gray-200">
<h3 class="text-xl font-semibold mb-3 flex items-center">
<i class="fas fa-dollar-sign mr-2 text-blue-500"></i> Pricing & Quotas
</h3>
<ul class="space-y-2">
<li><a href="https://cloud.google.com/vertex-ai/pricing" class="text-blue-500 hover:underline" target="_blank">Vertex AI Pricing</a></li>
<li><a href="https://cloud.google.com/vertex-ai/docs/general/quotas" class="text-blue-500 hover:underline" target="_blank">Service Quotas</a></li>
<li><a href="https://cloud.google.com/free" class="text-blue-500 hover:underline" target="_blank">Free Tier Information</a></li>
</ul>
</div>
<div class="card bg-white p-6 rounded-lg shadow-sm border border-gray-200">
<h3 class="text-xl font-semibold mb-3 flex items-center">
<i class="fas fa-users mr-2 text-blue-500"></i> Community Resources
</h3>
<ul class="space-y-2">
<li><a href="https://stackoverflow.com/questions/tagged/google-cloud-vertex-ai" class="text-blue-500 hover:underline" target="_blank">Stack Overflow</a></li>
<li><a href="https://github.com/GoogleCloudPlatform/vertex-ai-samples" class="text-blue-500 hover:underline" target="_blank">GitHub Samples</a></li>
<li><a href="https://groups.google.com/g/google-cloud-ai" class="text-blue-500 hover:underline" target="_blank">Google Group</a></li>
</ul>
</div>
</div>
</div>
</div>
</section>
<!-- Footer -->
<footer class="footer bg-white py-8 border-t border-gray-200">
<div class="container mx-auto px-4">
<div class="max-w-4xl mx-auto">
<div class="flex flex-col md:flex-row justify-between items-center">
<div class="mb-4 md:mb-0">
<div class="flex items-center space-x-2">
<i class="fas fa-robot text-blue-500 text-2xl"></i>
<span class="text-xl font-bold">Vertex AI Guide</span>
</div>
<p class="text-gray-600 mt-2">A step-by-step tutorial for image classification with Vertex AI</p>
</div>
<div class="flex space-x-4">
<a href="#" class="text-gray-600 hover:text-blue-500"><i class="fab fa-github text-xl"></i></a>
<a href="#" class="text-gray-600 hover:text-blue-500"><i class="fab fa-twitter text-xl"></i></a>
<a href="#" class="text-gray-600 hover:text-blue-500"><i class="fab fa-linkedin text-xl"></i></a>
</div>
</div>
<div class="mt-8 text-center text-gray-500 text-sm">
<p>This is an educational resource and not officially affiliated with Google Cloud.</p>
<p class="mt-2">© 2023 Vertex AI Guide. All rights reserved.</p>
</div>
</div>
</div>
</footer>
<script>
// Initialize syntax highlighting
document.addEventListener('DOMContentLoaded', (event) => {
document.querySelectorAll('pre code').forEach((block) => {
hljs.highlightElement(block);
});
});
// Dark mode toggle
const darkModeToggle = document.getElementById('darkModeToggle');
const html = document.documentElement;
// Check for saved user preference
const userPrefersDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
const currentTheme = localStorage.getItem('theme');
if (currentTheme === 'dark' || (!currentTheme && userPrefersDark)) {
html.classList.add('dark-mode');
darkModeToggle.innerHTML = '<i class="fas fa-sun"></i>';
}
darkModeToggle.addEventListener('click', () => {
if (html.classList.contains('dark-mode')) {
html.classList.remove('dark-mode');
localStorage.setItem('theme', 'light');
darkModeToggle.innerHTML = '<i class="fas fa-moon"></i>';
} else {
html.classList.add('dark-mode');
localStorage.setItem('theme', 'dark');
darkModeToggle.innerHTML = '<i class="fas fa-sun"></i>';
}
});
// Smooth scrolling for anchor links
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function (e) {
e.preventDefault();
document.querySelector(this.getAttribute('href')).scrollIntoView({
behavior: 'smooth'
});
});
});
</script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=mohpython/mohpython-vertex-ai" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>