DasariHarshitha commited on
Commit
2a3f3ae
Β·
verified Β·
1 Parent(s): 898dd45

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +58 -58
app.py CHANGED
@@ -1,58 +1,58 @@
1
- import streamlit as st
2
- import base64
3
-
4
- # Set page config
5
- st.set_page_config(page_title="🧠 Neural Network Playground", layout="wide")
6
-
7
- # Background image function
8
- def set_background(image_path):
9
- with open(image_path, "rb") as image_file:
10
- encoded = base64.b64encode(image_file.read()).decode()
11
-
12
- st.markdown(
13
- f"""
14
- <style>
15
- .stApp {{
16
- background-image: url("data:image/png;base64,{encoded}");
17
- background-size: cover;
18
- background-repeat: no-repeat;
19
- background-position: center;
20
- background-attachment: fixed;
21
- }}
22
- </style>
23
- """,
24
- unsafe_allow_html=True
25
- )
26
-
27
- # Set background image
28
- set_background(r"ann.jpeg")
29
-
30
-
31
- # --- Project README/Intro Section ---
32
-
33
- st.markdown("""
34
- # 🧠 Interactive Neural Network Playground
35
- A Python app that lets users explore how neural networks learn by adjusting hyperparameters and visualizing the results.
36
- ---
37
- ### πŸš€ What It Does
38
- - Lets you choose:
39
- - **Dataset**: moons, circles, blobs, classification
40
- - **Learning rate**
41
- - **Activation**: ReLU, Sigmoid, Tanh
42
- - **Train-test split ratio**
43
- - **Batch size**
44
- - **Epochs**:
45
- - **Hidden Layes**
46
- - **Number of Neurons**
47
-
48
-
49
- - Builds & trains a TensorFlow/Keras neural network on synthetic data.
50
- - Visualizes:
51
- - 🌈 **Decision boundaries** (how the model classifies the space)
52
- - πŸ“ˆ **Training vs testing error** across epochs
53
- ---
54
- ### 🎯 Why It’s Useful
55
- βœ… Understand hyperparameter effects
56
- βœ… See overfitting vs underfitting visually
57
- βœ… Learn neural network behavior interactively
58
- """)
 
1
+ import streamlit as st
2
+ import base64
3
+
4
+ # Set page config
5
+ st.set_page_config(page_title="🧠 Neural Network Playground", layout="wide")
6
+
7
+ # Background image function
8
+ def set_background(image_path):
9
+ with open(image_path, "rb") as image_file:
10
+ encoded = base64.b64encode(image_file.read()).decode()
11
+
12
+ st.markdown(
13
+ f"""
14
+ <style>
15
+ .stApp {{
16
+ background-image: url("data:image/png;base64,{encoded}");
17
+ background-size: cover;
18
+ background-repeat: no-repeat;
19
+ background-position: center;
20
+ background-attachment: fixed;
21
+ }}
22
+ </style>
23
+ """,
24
+ unsafe_allow_html=True
25
+ )
26
+
27
+ # Set background image
28
+ #set_background(r"ann.jpeg")
29
+
30
+
31
+ # --- Project README/Intro Section ---
32
+
33
+ st.markdown("""
34
+ # 🧠 Interactive Neural Network Playground
35
+ A Python app that lets users explore how neural networks learn by adjusting hyperparameters and visualizing the results.
36
+ ---
37
+ ### πŸš€ What It Does
38
+ - Lets you choose:
39
+ - **Dataset**: moons, circles, blobs, classification
40
+ - **Learning rate**
41
+ - **Activation**: ReLU, Sigmoid, Tanh
42
+ - **Train-test split ratio**
43
+ - **Batch size**
44
+ - **Epochs**:
45
+ - **Hidden Layes**
46
+ - **Number of Neurons**
47
+
48
+
49
+ - Builds & trains a TensorFlow/Keras neural network on synthetic data.
50
+ - Visualizes:
51
+ - 🌈 **Decision boundaries** (how the model classifies the space)
52
+ - πŸ“ˆ **Training vs testing error** across epochs
53
+ ---
54
+ ### 🎯 Why It’s Useful
55
+ βœ… Understand hyperparameter effects
56
+ βœ… See overfitting vs underfitting visually
57
+ βœ… Learn neural network behavior interactively
58
+ """)