Has724 commited on
Commit
0665d20
·
verified ·
1 Parent(s): 896b593

prepare for me an app in which I provide the details of the construction materials of a house and it builds for me 3D constructed house, - Initial Deployment

Browse files
Files changed (3) hide show
  1. README.md +7 -5
  2. index.html +214 -19
  3. prompts.txt +1 -0
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: First Project
3
- emoji: 📉
4
- colorFrom: gray
5
- colorTo: indigo
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: first-project
3
+ emoji: 🐳
4
+ colorFrom: yellow
5
+ colorTo: yellow
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
index.html CHANGED
@@ -1,19 +1,214 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>3D House Constructor</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js"></script>
9
+ <script src="https://cdn.jsdelivr.net/npm/three@0.128.0/examples/js/controls/OrbitControls.min.js"></script>
10
+ <style>
11
+ #houseCanvas {
12
+ width: 100%;
13
+ height: 100%;
14
+ display: block;
15
+ }
16
+ .material-color-preview {
17
+ width: 25px;
18
+ height: 25px;
19
+ border-radius: 50%;
20
+ display: inline-block;
21
+ margin-left: 10px;
22
+ border: 1px solid #ccc;
23
+ }
24
+ .tooltip {
25
+ position: relative;
26
+ display: inline-block;
27
+ }
28
+ .tooltip .tooltiptext {
29
+ visibility: hidden;
30
+ width: 200px;
31
+ background-color: #555;
32
+ color: #fff;
33
+ text-align: center;
34
+ border-radius: 6px;
35
+ padding: 5px;
36
+ position: absolute;
37
+ z-index: 1;
38
+ bottom: 125%;
39
+ left: 50%;
40
+ margin-left: -100px;
41
+ opacity: 0;
42
+ transition: opacity 0.3s;
43
+ }
44
+ .tooltip:hover .tooltiptext {
45
+ visibility: visible;
46
+ opacity: 1;
47
+ }
48
+ @media (max-width: 768px) {
49
+ .flex-col-reverse-mobile {
50
+ flex-direction: column-reverse;
51
+ }
52
+ }
53
+ </style>
54
+ </head>
55
+ <body class="bg-gray-100 min-h-screen">
56
+ <div class="container mx-auto px-4 py-8">
57
+ <header class="text-center mb-8">
58
+ <h1 class="text-4xl font-bold text-blue-800 mb-2">3D House Constructor</h1>
59
+ <p class="text-gray-600">Input your construction materials and see your dream house in 3D</p>
60
+ </header>
61
+
62
+ <div class="flex flex-col lg:flex-row gap-8">
63
+ <!-- Input Form -->
64
+ <div class="w-full lg:w-1/3 bg-white p-6 rounded-lg shadow-md">
65
+ <h2 class="text-2xl font-semibold mb-4 text-blue-700">House Specifications</h2>
66
+
67
+ <form id="houseForm" class="space-y-4">
68
+ <!-- Basic Dimensions -->
69
+ <div class="bg-blue-50 p-4 rounded-lg">
70
+ <h3 class="font-medium text-blue-800 mb-2">Basic Dimensions</h3>
71
+ <div class="grid grid-cols-2 gap-4">
72
+ <div>
73
+ <label for="width" class="block text-sm font-medium text-gray-700">Width (m)</label>
74
+ <input type="number" id="width" min="5" max="50" value="10" class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500">
75
+ </div>
76
+ <div>
77
+ <label for="depth" class="block text-sm font-medium text-gray-700">Depth (m)</label>
78
+ <input type="number" id="depth" min="5" max="50" value="8" class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500">
79
+ </div>
80
+ <div>
81
+ <label for="height" class="block text-sm font-medium text-gray-700">Height (m)</label>
82
+ <input type="number" id="height" min="2" max="20" value="3" class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500">
83
+ </div>
84
+ <div>
85
+ <label for="floors" class="block text-sm font-medium text-gray-700">Floors</label>
86
+ <select id="floors" class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500">
87
+ <option value="1">1</option>
88
+ <option value="2" selected>2</option>
89
+ <option value="3">3</option>
90
+ </select>
91
+ </div>
92
+ </div>
93
+ </div>
94
+
95
+ <!-- Roof Options -->
96
+ <div class="bg-blue-50 p-4 rounded-lg">
97
+ <h3 class="font-medium text-blue-800 mb-2">Roof Options</h3>
98
+ <div class="space-y-3">
99
+ <div>
100
+ <label for="roofType" class="block text-sm font-medium text-gray-700">Roof Type</label>
101
+ <select id="roofType" class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500">
102
+ <option value="flat">Flat Roof</option>
103
+ <option value="gable" selected>Gable Roof</option>
104
+ <option value="hip">Hip Roof</option>
105
+ </select>
106
+ </div>
107
+ <div>
108
+ <label for="roofColor" class="block text-sm font-medium text-gray-700">Roof Color</label>
109
+ <div class="flex items-center mt-1">
110
+ <input type="color" id="roofColor" value="#8B4513" class="rounded-md border-gray-300 shadow-sm">
111
+ <span class="material-color-preview" id="roofColorPreview" style="background-color: #8B4513;"></span>
112
+ </div>
113
+ </div>
114
+ <div>
115
+ <label for="roofMaterial" class="block text-sm font-medium text-gray-700">Roof Material</label>
116
+ <select id="roofMaterial" class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500">
117
+ <option value="tiles">Clay Tiles</option>
118
+ <option value="metal" selected>Metal Sheets</option>
119
+ <option value="shingles">Asphalt Shingles</option>
120
+ </select>
121
+ </div>
122
+ </div>
123
+ </div>
124
+
125
+ <!-- Wall Options -->
126
+ <div class="bg-blue-50 p-4 rounded-lg">
127
+ <h3 class="font-medium text-blue-800 mb-2">Wall Options</h3>
128
+ <div class="space-y-3">
129
+ <div>
130
+ <label for="wallColor" class="block text-sm font-medium text-gray-700">Wall Color</label>
131
+ <div class="flex items-center mt-1">
132
+ <input type="color" id="wallColor" value="#F5DEB3" class="rounded-md border-gray-300 shadow-sm">
133
+ <span class="material-color-preview" id="wallColorPreview" style="background-color: #F5DEB3;"></span>
134
+ </div>
135
+ </div>
136
+ <div>
137
+ <label for="wallMaterial" class="block text-sm font-medium text-gray-700">Wall Material</label>
138
+ <select id="wallMaterial" class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500">
139
+ <option value="brick">Brick</option>
140
+ <option value="concrete" selected>Concrete</option>
141
+ <option value="wood">Wood</option>
142
+ </select>
143
+ </div>
144
+ <div>
145
+ <label for="windowCount" class="block text-sm font-medium text-gray-700">Windows per Wall</label>
146
+ <input type="number" id="windowCount" min="0" max="10" value="3" class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500">
147
+ </div>
148
+ </div>
149
+ </div>
150
+
151
+ <!-- Door Options -->
152
+ <div class="bg-blue-50 p-4 rounded-lg">
153
+ <h3 class="font-medium text-blue-800 mb-2">Door Options</h3>
154
+ <div class="space-y-3">
155
+ <div>
156
+ <label for="doorColor" class="block text-sm font-medium text-gray-700">Door Color</label>
157
+ <div class="flex items-center mt-1">
158
+ <input type="color" id="doorColor" value="#8B4513" class="rounded-md border-gray-300 shadow-sm">
159
+ <span class="material-color-preview" id="doorColorPreview" style="background-color: #8B4513;"></span>
160
+ </div>
161
+ </div>
162
+ <div>
163
+ <label for="doorMaterial" class="block text-sm font-medium text-gray-700">Door Material</label>
164
+ <select id="doorMaterial" class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500">
165
+ <option value="wood" selected>Wood</option>
166
+ <option value="metal">Metal</option>
167
+ <option value="glass">Glass</option>
168
+ </select>
169
+ </div>
170
+ <div>
171
+ <label for="doorPosition" class="block text-sm font-medium text-gray-700">Door Position</label>
172
+ <select id="doorPosition" class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500">
173
+ <option value="front">Front</option>
174
+ <option value="side" selected>Side</option>
175
+ </select>
176
+ </div>
177
+ </div>
178
+ </div>
179
+
180
+ <div class="pt-2">
181
+ <button type="button" id="generateBtn" class="w-full bg-blue-600 hover:bg-blue-700 text-white font-bold py-3 px-4 rounded-md transition duration-300">
182
+ Generate 3D House
183
+ </button>
184
+ </div>
185
+ </form>
186
+ </div>
187
+
188
+ <!-- 3D Viewer -->
189
+ <div class="w-full lg:w-2/3 bg-white p-4 rounded-lg shadow-md">
190
+ <div class="flex justify-between items-center mb-4">
191
+ <h2 class="text-2xl font-semibold text-blue-700">3D House Preview</h2>
192
+ <div class="flex space-x-2">
193
+ <button id="rotateBtn" class="bg-gray-200 hover:bg-gray-300 px-3 py-1 rounded-md text-sm tooltip">
194
+ <span>🔄</span>
195
+ <span class="tooltiptext">Toggle Auto Rotation</span>
196
+ </button>
197
+ <button id="resetViewBtn" class="bg-gray-200 hover:bg-gray-300 px-3 py-1 rounded-md text-sm tooltip">
198
+ <span>🏠</span>
199
+ <span class="tooltiptext">Reset View</span>
200
+ </button>
201
+ <button id="wireframeBtn" class="bg-gray-200 hover:bg-gray-300 px-3 py-1 rounded-md text-sm tooltip">
202
+ <span>🔲</span>
203
+ <span class="tooltiptext">Toggle Wireframe</span>
204
+ </button>
205
+ </div>
206
+ </div>
207
+
208
+ <div id="houseContainer" class="relative h-96 md:h-[500px] w-full bg-gray-100 rounded-lg overflow-hidden">
209
+ <div id="loading" class="absolute inset-0 flex items-center justify-center bg-black bg-opacity-50 text-white text-lg">
210
+ Loading 3D model...
211
+ </div>
212
+ <canvas id="houseCanvas"></
213
+ <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://deepsite.hf.co/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://deepsite.hf.co" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://deepsite.hf.co?remix=Has724/first-project" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
214
+ </html>
prompts.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ prepare for me an app in which I provide the details of the construction materials of a house and it builds for me 3D constructed house,