Spaces:
Sleeping
Sleeping
Commit
·
a69cbd5
1
Parent(s):
3878a2a
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -26,26 +26,89 @@ def on_btn_click():
|
|
| 26 |
|
| 27 |
|
| 28 |
def main():
|
| 29 |
-
st.title("
|
| 30 |
-
option = st.selectbox(" ImageNet / CoCo", [" ImageNet ", " CoCo"])
|
| 31 |
-
value = st.slider(" Threshold", min_value=0, max_value=100, value=50, key=57)
|
| 32 |
(
|
| 33 |
col1,
|
| 34 |
col2,
|
| 35 |
) = st.columns(2)
|
| 36 |
with col1:
|
| 37 |
-
|
| 38 |
-
st.write("Checkbox checked!")
|
| 39 |
with col2:
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
)
|
| 50 |
|
| 51 |
|
|
|
|
| 26 |
|
| 27 |
|
| 28 |
def main():
|
| 29 |
+
st.title(" US Real Estate Data and Market Trends")
|
|
|
|
|
|
|
| 30 |
(
|
| 31 |
col1,
|
| 32 |
col2,
|
| 33 |
) = st.columns(2)
|
| 34 |
with col1:
|
| 35 |
+
option = st.selectbox(" Monthly / Weekly", [" Monthly ", " Weekly"])
|
|
|
|
| 36 |
with col2:
|
| 37 |
+
option = st.selectbox(" Current / Historical", [" Current ", " Historical"])
|
| 38 |
+
(
|
| 39 |
+
col1,
|
| 40 |
+
col2,
|
| 41 |
+
) = st.columns(2)
|
| 42 |
+
with col1:
|
| 43 |
+
option = st.selectbox(" Median / Mean", [" Median ", " Mean"])
|
| 44 |
+
with col2:
|
| 45 |
+
option = st.selectbox(" San Francisco", [" San Francisco"])
|
| 46 |
+
(
|
| 47 |
+
col1,
|
| 48 |
+
col2,
|
| 49 |
+
) = st.columns(2)
|
| 50 |
+
with col1:
|
| 51 |
+
selected_color = st.color_picker(" Choose a palate", "#FF0000")
|
| 52 |
+
with col2:
|
| 53 |
+
value = st.slider(" No of colors", min_value=0, max_value=100, value=50, key=70)
|
| 54 |
+
if st.checkbox(" Show raw data"):
|
| 55 |
+
st.write("Checkbox checked!")
|
| 56 |
+
st.subheader(" Global 3D Visualization")
|
| 57 |
+
st.pydeck_chart(
|
| 58 |
+
pdk.Deck(
|
| 59 |
+
map_style=None,
|
| 60 |
+
initial_view_state=pdk.ViewState(
|
| 61 |
+
latitude=37.76, longitude=-122.4, zoom=11, pitch=50
|
| 62 |
+
),
|
| 63 |
+
layers=[
|
| 64 |
+
pdk.Layer(
|
| 65 |
+
"HexagonLayer",
|
| 66 |
+
data=pd.DataFrame(
|
| 67 |
+
np.random.randn(1000, 2) / [50, 50] + [37.76, -122.4],
|
| 68 |
+
columns=["lat", "lon"],
|
| 69 |
+
),
|
| 70 |
+
get_position="[lon, lat]",
|
| 71 |
+
radius=200,
|
| 72 |
+
elevation_scale=4,
|
| 73 |
+
elevation_range=[0, 1000],
|
| 74 |
+
pickable=True,
|
| 75 |
+
extruded=True,
|
| 76 |
+
),
|
| 77 |
+
pdk.Layer(
|
| 78 |
+
"ScatterplotLayer",
|
| 79 |
+
data=pd.DataFrame(
|
| 80 |
+
np.random.randn(1000, 2) / [50, 50] + [37.76, -122.4],
|
| 81 |
+
columns=["lat", "lon"],
|
| 82 |
+
),
|
| 83 |
+
get_position="[lon, lat]",
|
| 84 |
+
get_color="[200, 30, 0, 160]",
|
| 85 |
+
get_radius=200,
|
| 86 |
+
),
|
| 87 |
+
],
|
| 88 |
+
)
|
| 89 |
+
)
|
| 90 |
+
st.subheader(" 2D Visualization")
|
| 91 |
+
st.altair_chart(
|
| 92 |
+
alt.Chart(
|
| 93 |
+
pd.DataFrame(
|
| 94 |
+
{
|
| 95 |
+
"x": np.random.rand(50),
|
| 96 |
+
"y": np.random.rand(50),
|
| 97 |
+
"size": np.random.randint(10, 100, 50),
|
| 98 |
+
"color": np.random.rand(50),
|
| 99 |
+
}
|
| 100 |
+
)
|
| 101 |
+
)
|
| 102 |
+
.mark_circle()
|
| 103 |
+
.encode(
|
| 104 |
+
x="x",
|
| 105 |
+
y="y",
|
| 106 |
+
size="size",
|
| 107 |
+
color="color",
|
| 108 |
+
tooltip=["x", "y", "size", "color"],
|
| 109 |
+
)
|
| 110 |
+
.properties(width=600, height=400),
|
| 111 |
+
use_container_width=True,
|
| 112 |
)
|
| 113 |
|
| 114 |
|