Praveen998 commited on
Commit
4201985
·
1 Parent(s): ad8d5aa

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +51 -71
app.py CHANGED
@@ -26,79 +26,59 @@ def on_btn_click():
26
 
27
 
28
  def main():
29
- st.title(" 3D Visualisation")
30
- z_data = pd.read_csv(
31
- "https://raw.githubusercontent.com/plotly/datasets/master/api_docs/mt_bruno_elevation.csv"
 
32
  )
33
- fig = go.Figure(data=go.Surface(z=z_data, showscale=False))
34
- fig.update_layout(
35
- title="Mt Bruno Elevation",
36
- width=400,
37
- height=400,
38
- margin=dict(t=40, r=0, l=20, b=20),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
  )
40
- name = "default"
41
- camera = dict(
42
- up=dict(x=0, y=0, z=1),
43
- center=dict(x=0, y=0, z=0),
44
- eye=dict(x=1.25, y=1.25, z=1.25),
45
- )
46
- fig.update_layout(scene_camera=camera, title=name)
47
- st.plotly_chart(fig)
48
- df = px.data.election()
49
- geojson = px.data.election_geojson()
50
- fig = px.choropleth_mapbox(
51
- df,
52
- geojson=geojson,
53
- color="Bergeron",
54
- locations="district",
55
- featureidkey="properties.district",
56
- center={"lat": 45.5517, "lon": -73.7073},
57
- mapbox_style="carto-positron",
58
- zoom=9,
59
- )
60
- st.plotly_chart(fig)
61
- fig = make_subplots(
62
- rows=2,
63
- cols=2,
64
- specs=[
65
- [{"type": "surface"}, {"type": "surface"}],
66
- [{"type": "surface"}, {"type": "surface"}],
67
- ],
68
- )
69
- x = np.linspace(-5, 80, 10)
70
- y = np.linspace(-5, 60, 10)
71
- xGrid, yGrid = np.meshgrid(y, x)
72
- z = xGrid**3 + yGrid**3
73
- fig.add_trace(
74
- go.Surface(x=x, y=y, z=z, colorscale="Viridis", showscale=False), row=1, col=1
75
- )
76
- fig.add_trace(
77
- go.Surface(x=x, y=y, z=z, colorscale="RdBu", showscale=False), row=1, col=2
78
- )
79
- fig.add_trace(
80
- go.Surface(x=x, y=y, z=z, colorscale="YlOrRd", showscale=False), row=2, col=1
81
- )
82
- fig.add_trace(
83
- go.Surface(x=x, y=y, z=z, colorscale="YlGnBu", showscale=False), row=2, col=2
84
- )
85
- fig.update_layout(
86
- title_text="3D subplots with different colorscales", height=800, width=800
87
- )
88
- st.plotly_chart(fig)
89
- fig = px.scatter_3d(
90
- px.data.iris(),
91
- x="sepal_length",
92
- y="sepal_width",
93
- z="petal_width",
94
- color="petal_length",
95
- size="petal_length",
96
- size_max=18,
97
- symbol="species",
98
- opacity=0.7,
99
- )
100
- fig.update_layout(margin=dict(l=0, r=0, b=0, t=0))
101
- st.plotly_chart(fig)
102
 
103
 
104
  if __name__ == "__main__":
 
26
 
27
 
28
  def main():
29
+ st.title(" Stock Forecasting App")
30
+ uploaded_file = st.file_uploader("Choose a file", type=["jpg", "png", "mp3"])
31
+ value = st.slider(
32
+ " Select Horizon Period", min_value=0, max_value=100, value=50, key=18
33
  )
34
+ value = st.slider(" Folds", min_value=0, max_value=100, value=50, key=80)
35
+ if st.button(" start"):
36
+ st.write("Button clicked!")
37
+ st.title(" Training")
38
+ (
39
+ col1,
40
+ col2,
41
+ ) = st.columns(2)
42
+ with col1:
43
+ st.table(
44
+ {
45
+ "Country": ["USA", "Canada", "UK", "Australia"],
46
+ "Population (millions)": [331, 38, 66, 25],
47
+ "GDP (trillion USD)": [22.675, 1.843, 2.855, 1.488],
48
+ }
49
+ )
50
+ with col2:
51
+ data = {"key": "value", "name": "John Doe", "age": 30}
52
+ st.json(data)
53
+ st.title(" Forecast")
54
+ (
55
+ col1,
56
+ col2,
57
+ ) = st.columns(2)
58
+ with col1:
59
+ st.line_chart(
60
+ pd.DataFrame(
61
+ {
62
+ "Apple": yf.download("AAPL", start="2023-01-01", end="2023-07-31")[
63
+ "Adj Close"
64
+ ],
65
+ "Google": yf.download(
66
+ "GOOGL", start="2023-01-01", end="2023-07-31"
67
+ )["Adj Close"],
68
+ "Microsoft": yf.download(
69
+ "MSFT", start="2023-01-01", end="2023-07-31"
70
+ )["Adj Close"],
71
+ }
72
+ )
73
+ )
74
+ with col2:
75
+ data = pd.DataFrame(
76
+ {"X": [1, 2, 3, 4, 5], "Y1": [10, 16, 8, 14, 12], "Y2": [5, 8, 3, 6, 7]}
77
+ )
78
+ st.area_chart(data)
79
+ st.bar_chart(
80
+ pd.DataFrame(np.random.randn(20, 3), columns=["Apple", "Banana", "Cherry"])
81
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82
 
83
 
84
  if __name__ == "__main__":