Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -2,16 +2,6 @@ import streamlit as st
|
|
2 |
from streamlit.components.v1 import html
|
3 |
import streamlit as st
|
4 |
|
5 |
-
# User Inputs
|
6 |
-
wall_height = st.slider("Wall Height (meters)", min_value=2, max_value=5, value=3)
|
7 |
-
room_length = st.number_input("Room Length (meters)", value=5)
|
8 |
-
room_width = st.number_input("Room Width (meters)", value=4)
|
9 |
-
|
10 |
-
# Action Button for Floor Plan Update
|
11 |
-
if st.button("Generate Floor Plan"):
|
12 |
-
st.write(f"Generating floor plan for {room_length}m x {room_width}m with walls {wall_height}m high")
|
13 |
-
# Call a function here that updates the floor plan based on user input
|
14 |
-
update_floor_plan(room_length, room_width, wall_height)
|
15 |
|
16 |
# Embed custom HTML and JS for 3D rendering (Three.js example)
|
17 |
html_code = """
|
@@ -48,3 +38,13 @@ html_code = """
|
|
48 |
|
49 |
# Display the HTML/JS in the Streamlit app
|
50 |
html(html_code)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
from streamlit.components.v1 import html
|
3 |
import streamlit as st
|
4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
# Embed custom HTML and JS for 3D rendering (Three.js example)
|
7 |
html_code = """
|
|
|
38 |
|
39 |
# Display the HTML/JS in the Streamlit app
|
40 |
html(html_code)
|
41 |
+
# User Inputs
|
42 |
+
wall_height = st.slider("Wall Height (meters)", min_value=2, max_value=5, value=3)
|
43 |
+
room_length = st.number_input("Room Length (meters)", value=5)
|
44 |
+
room_width = st.number_input("Room Width (meters)", value=4)
|
45 |
+
|
46 |
+
# Action Button for Floor Plan Update
|
47 |
+
if st.button("Generate Floor Plan"):
|
48 |
+
st.write(f"Generating floor plan for {room_length}m x {room_width}m with walls {wall_height}m high")
|
49 |
+
# Call a function here that updates the floor plan based on user input
|
50 |
+
update_floor_plan(room_length, room_width, wall_height)
|