Skip to content

Commit

Permalink
some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ombhojane committed Feb 15, 2024
1 parent efb7f14 commit b53a259
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 35 deletions.
2 changes: 1 addition & 1 deletion templates/generate.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<body class="bg-gray-50 text-gray-800">
<div class="container mx-auto px-4">
<nav class="flex justify-between items-center py-6">
<a href="#" class="text-2xl font-bold text-gray-800">Chalo Kisaan</a>
<a href="/" class="text-2xl font-bold text-gray-800">Chalo Kisaan</a>
<div class="menu-toggle" onclick="toggleMenu()">
<i class="fas fa-bars fa-2x"></i>
</div>
Expand Down
4 changes: 2 additions & 2 deletions templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<body>
<div class="container mx-auto px-4">
<nav class="flex justify-between items-center py-6">
<a href="#" class="text-2xl font-bold text-gray-800">Chalo Kisaan</a>
<a href="/" class="text-2xl font-bold text-gray-800">Chalo Kisaan</a>
<div class="menu-toggle" onclick="toggleMenu()">
<i class="fas fa-bars fa-2x"></i>
</div>
Expand Down Expand Up @@ -100,7 +100,7 @@ <h2 class="text-4xl font-bold text-gray-800 mb-4">Image Generator for Farm Servi
<!-- Section 3: Image Generator -->
<section class="flex flex-col md:flex-row justify-between items-center py-10">
<div class="w-full md:w-1/2 mb-4 md:mb-0">
<img src="https://placehold.co/600x400" alt="Image Generator Visualization" class="mx-auto">
<img src="https://i.postimg.cc/vm8NbBH8/ed5289b6-b4fc-48fd-955d-c7014954b63f.webp" height="200" width="600" alt="Image Generator Visualization" class="mx-auto">
</div>
<div class="w-full md:w-1/2 px-8">
<h2 class="text-4xl font-bold text-gray-800 mb-4">Comprehensive Business Model and Planning Tools</h2>
Expand Down
2 changes: 1 addition & 1 deletion templates/predict.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

<!-- Navigation -->
<nav class="flex justify-between items-center py-6">
<a href="#" class="text-2xl font-bold text-gray-800">Chalo Kisaan</a>
<a href="/" class="text-2xl font-bold text-gray-800">Chalo Kisaan</a>
<div class="menu-toggle" onclick="toggleMenu()">
<i class="fas fa-bars fa-2x"></i>
</div>
Expand Down
47 changes: 16 additions & 31 deletions templates/visualize.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,22 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Image Generation</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Work in Progress</title>
<link href="https://cdn.tailwindcss.com" rel="stylesheet">
<style>
/* Additional custom styles if needed */
</style>
</head>
<body>
<h2>Image Generation Form</h2>
<form id="generateForm" enctype="multipart/form-data">
<input type="file" id="image" name="image" required>
<button type="submit">Generate Image</button>
</form>
<h3>Generated Image:</h3>
<img id="outputImage" src="" alt="Generated Image" style="max-width: 500px;">

<script>
document.getElementById('generateForm').addEventListener('submit', function(e) {
e.preventDefault(); // Prevent the default form submission

const formData = new FormData();
const imageInput = document.getElementById('image');
if (imageInput.files.length > 0) {
formData.append('image', imageInput.files[0]);
}

fetch('/generate-image', {
method: 'POST',
body: formData,
})
.then(response => response.json())
.then(data => {
document.getElementById('outputImage').src = data.generatedImageUrl;
})
.catch(error => console.error('Error:', error));
});
</script>
<body class="bg-gray-100 flex items-center justify-center h-screen">
<div class="text-center">
<h1 class="text-4xl font-bold text-gray-800 mb-4">Work in Progress</h1>
<p class="text-lg text-gray-600 mb-5">We're working hard to finish the development of this page. Check back soon!</p>
<div>
<a href="/" class="inline-block bg-blue-500 text-white font-bold py-2 px-4 rounded-lg hover:bg-blue-600 transition duration-300">
Go Back to Home
</a>
</div>
</div>
</body>
</html>

0 comments on commit b53a259

Please sign in to comment.