deniztas commited on
Commit
f1aaf2f
·
verified ·
1 Parent(s): 8e1bfbd

koyu mor gri tema ekle ve görünüşü değiştir - Follow Up Deployment

Browse files
Files changed (1) hide show
  1. index.html +23 -22
index.html CHANGED
@@ -9,9 +9,10 @@
9
  <style>
10
  .prediction-bar {
11
  height: 24px;
12
- background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 100%);
13
  border-radius: 12px;
14
  transition: width 0.3s ease;
 
15
  }
16
  .webcam-feed {
17
  border-radius: 16px;
@@ -28,52 +29,52 @@
28
  }
29
  </style>
30
  </head>
31
- <body class="bg-gradient-to-br from-gray-50 to-gray-100 min-h-screen">
32
  <div class="container mx-auto px-4 py-12">
33
  <div class="max-w-4xl mx-auto">
34
  <!-- Header -->
35
  <div class="text-center mb-12">
36
- <h1 class="text-4xl font-bold text-gray-800 mb-2">
37
- <i class="fas fa-robot text-blue-500 mr-2"></i> AI Vision Classifier
38
  </h1>
39
- <p class="text-gray-600 max-w-lg mx-auto">
40
  A real-time image classification system powered by Teachable Machine.
41
  Point your camera at objects to see the AI's predictions.
42
  </p>
43
  </div>
44
 
45
  <!-- Main Content -->
46
- <div class="bg-white rounded-xl shadow-lg overflow-hidden">
47
  <div class="p-6 md:p-8">
48
  <!-- Webcam Container -->
49
  <div class="flex flex-col md:flex-row gap-8">
50
  <div class="flex-1">
51
  <div class="mb-4 flex justify-between items-center">
52
- <h2 class="text-xl font-semibold text-gray-800">
53
- <i class="fas fa-camera text-blue-500 mr-2"></i> Live Feed
54
  </h2>
55
  <div class="flex gap-2">
56
- <button id="startBtn" onclick="init()" class="bg-blue-500 hover:bg-blue-600 text-white px-4 py-2 rounded-lg transition flex items-center">
57
  <i class="fas fa-play mr-2"></i> Start Camera
58
  </button>
59
- <label for="fileUpload" class="bg-purple-500 hover:bg-purple-600 text-white px-4 py-2 rounded-lg transition flex items-center cursor-pointer">
60
  <i class="fas fa-upload mr-2"></i> Upload Image
61
  <input id="fileUpload" type="file" accept="image/*" class="hidden" onchange="handleImageUpload(this)">
62
  </label>
63
  </div>
64
  </div>
65
- <div id="webcam-container" class="webcam-feed bg-gray-200 w-full aspect-square flex items-center justify-center rounded-lg overflow-hidden">
66
  <div class="text-center p-4">
67
- <i class="fas fa-camera text-gray-400 text-4xl mb-2"></i>
68
- <p class="text-gray-500">Camera feed will appear here</p>
69
  </div>
70
  </div>
71
  </div>
72
 
73
  <!-- Predictions Container -->
74
  <div class="flex-1">
75
- <h2 class="text-xl font-semibold text-gray-800 mb-4">
76
- <i class="fas fa-chart-bar text-purple-500 mr-2"></i> Predictions
77
  </h2>
78
  <div id="label-container" class="space-y-4">
79
  <div class="bg-gray-100 p-6 rounded-lg text-center">
@@ -86,11 +87,11 @@
86
  </div>
87
 
88
  <!-- Instructions -->
89
- <div class="mt-8 bg-blue-50 p-4 rounded-lg">
90
- <h3 class="font-medium text-blue-800 mb-2 flex items-center">
91
- <i class="fas fa-info-circle mr-2"></i> How to use
92
  </h3>
93
- <ol class="list-decimal list-inside text-blue-700 space-y-1 text-sm">
94
  <li>Click "Start Camera" and allow access to your webcam</li>
95
  <li>Point your camera at objects you've trained the model to recognize</li>
96
  <li>View real-time predictions with confidence percentages</li>
@@ -101,7 +102,7 @@
101
  </div>
102
 
103
  <!-- Footer -->
104
- <div class="mt-8 text-center text-gray-500 text-sm">
105
  <p>Powered by Teachable Machine and TensorFlow.js</p>
106
  </div>
107
  </div>
@@ -155,8 +156,8 @@
155
  }
156
 
157
  startBtn.innerHTML = '<i class="fas fa-check-circle mr-2"></i> Running';
158
- startBtn.classList.remove('bg-blue-500', 'hover:bg-blue-600');
159
- startBtn.classList.add('bg-green-500', 'hover:bg-green-600');
160
 
161
  isRunning = true;
162
  window.requestAnimationFrame(loop);
 
9
  <style>
10
  .prediction-bar {
11
  height: 24px;
12
+ background: linear-gradient(90deg, #7e22ce 0%, #a855f7 100%);
13
  border-radius: 12px;
14
  transition: width 0.3s ease;
15
+ box-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
16
  }
17
  .webcam-feed {
18
  border-radius: 16px;
 
29
  }
30
  </style>
31
  </head>
32
+ <body class="bg-gradient-to-br from-gray-900 to-purple-900 min-h-screen text-gray-100">
33
  <div class="container mx-auto px-4 py-12">
34
  <div class="max-w-4xl mx-auto">
35
  <!-- Header -->
36
  <div class="text-center mb-12">
37
+ <h1 class="text-4xl font-bold text-purple-300 mb-2">
38
+ <i class="fas fa-robot text-purple-400 mr-2"></i> AI Vision Classifier
39
  </h1>
40
+ <p class="text-gray-300 max-w-lg mx-auto">
41
  A real-time image classification system powered by Teachable Machine.
42
  Point your camera at objects to see the AI's predictions.
43
  </p>
44
  </div>
45
 
46
  <!-- Main Content -->
47
+ <div class="bg-gray-800 rounded-xl shadow-lg overflow-hidden border border-purple-800">
48
  <div class="p-6 md:p-8">
49
  <!-- Webcam Container -->
50
  <div class="flex flex-col md:flex-row gap-8">
51
  <div class="flex-1">
52
  <div class="mb-4 flex justify-between items-center">
53
+ <h2 class="text-xl font-semibold text-purple-300">
54
+ <i class="fas fa-camera text-purple-400 mr-2"></i> Live Feed
55
  </h2>
56
  <div class="flex gap-2">
57
+ <button id="startBtn" onclick="init()" class="bg-purple-700 hover:bg-purple-600 text-white px-4 py-2 rounded-lg transition flex items-center">
58
  <i class="fas fa-play mr-2"></i> Start Camera
59
  </button>
60
+ <label for="fileUpload" class="bg-purple-800 hover:bg-purple-700 text-white px-4 py-2 rounded-lg transition flex items-center cursor-pointer">
61
  <i class="fas fa-upload mr-2"></i> Upload Image
62
  <input id="fileUpload" type="file" accept="image/*" class="hidden" onchange="handleImageUpload(this)">
63
  </label>
64
  </div>
65
  </div>
66
+ <div id="webcam-container" class="webcam-feed bg-gray-700 w-full aspect-square flex items-center justify-center rounded-lg overflow-hidden border border-purple-800">
67
  <div class="text-center p-4">
68
+ <i class="fas fa-camera text-purple-400 text-4xl mb-2"></i>
69
+ <p class="text-gray-300">Camera feed will appear here</p>
70
  </div>
71
  </div>
72
  </div>
73
 
74
  <!-- Predictions Container -->
75
  <div class="flex-1">
76
+ <h2 class="text-xl font-semibold text-purple-300 mb-4">
77
+ <i class="fas fa-chart-bar text-purple-400 mr-2"></i> Predictions
78
  </h2>
79
  <div id="label-container" class="space-y-4">
80
  <div class="bg-gray-100 p-6 rounded-lg text-center">
 
87
  </div>
88
 
89
  <!-- Instructions -->
90
+ <div class="mt-8 bg-purple-900/30 p-4 rounded-lg border border-purple-800">
91
+ <h3 class="font-medium text-purple-300 mb-2 flex items-center">
92
+ <i class="fas fa-info-circle text-purple-400 mr-2"></i> How to use
93
  </h3>
94
+ <ol class="list-decimal list-inside text-purple-200 space-y-1 text-sm">
95
  <li>Click "Start Camera" and allow access to your webcam</li>
96
  <li>Point your camera at objects you've trained the model to recognize</li>
97
  <li>View real-time predictions with confidence percentages</li>
 
102
  </div>
103
 
104
  <!-- Footer -->
105
+ <div class="mt-8 text-center text-gray-400 text-sm">
106
  <p>Powered by Teachable Machine and TensorFlow.js</p>
107
  </div>
108
  </div>
 
156
  }
157
 
158
  startBtn.innerHTML = '<i class="fas fa-check-circle mr-2"></i> Running';
159
+ startBtn.classList.remove('bg-purple-700', 'hover:bg-purple-600');
160
+ startBtn.classList.add('bg-purple-600', 'hover:bg-purple-500');
161
 
162
  isRunning = true;
163
  window.requestAnimationFrame(loop);