Bhargavitippareddy commited on
Commit
fe5b033
·
verified ·
1 Parent(s): 755e89e

Upload 11 files

Browse files
.gitattributes CHANGED
@@ -33,3 +33,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ Air-Quality-INDEX.jpg filter=lfs diff=lfs merge=lfs -text
37
+ g.jpg filter=lfs diff=lfs merge=lfs -text
Air-Quality-INDEX.jpg ADDED

Git LFS Details

  • SHA256: 4130d737cb2c2aa0f364bc505610a0eca07620f1d64405f8c7c17ef4f7ebee6d
  • Pointer size: 132 Bytes
  • Size of remote file: 1.24 MB
Image%20size%20in%20Streamlit.html ADDED
The diff for this file is too large to render. See raw diff
 
Model.py ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import pickle
3
+ import numpy as np
4
+
5
+ # Load the trained model
6
+ model_path = "final.pkl"
7
+ with open(model_path, "rb") as f:
8
+ model = pickle.load(f)
9
+
10
+ # Set page configuration
11
+ st.set_page_config(page_title="AQI Prediction App", page_icon="🌍", layout="centered")
12
+
13
+
14
+ # Custom CSS for styling
15
+ st.markdown("""
16
+ <style>
17
+ .stApp {
18
+ background-color: #015551;
19
+ color: white;
20
+ }
21
+ .title {
22
+ text-align: center;
23
+ color: #4CAF50;
24
+ font-size: 40px;
25
+ }
26
+ .stTextInput label {
27
+ font-size: 18px;
28
+ font-weight: bold;
29
+ }
30
+ </style>
31
+ """, unsafe_allow_html=True)
32
+
33
+ # Page title
34
+ st.markdown('<p class="title"><h1>🌍 AQI Prediction App</h1></p>', unsafe_allow_html=True)
35
+
36
+ st.write("### Enter Air Quality Parameters Below:")
37
+
38
+ # Create input fields for user inputs
39
+ col1, col2 = st.columns(2)
40
+
41
+ with col1:
42
+ pm25 = st.text_input("PM2.5", "50.0")
43
+ pm10 = st.text_input("PM10", "100.0")
44
+ no = st.text_input("NO", "20.0")
45
+ no2 = st.text_input("NO2", "30.0")
46
+
47
+ with col2:
48
+ nox = st.text_input("NOx", "50.0")
49
+ nh3 = st.text_input("NH3", "20.0")
50
+ co = st.text_input("CO", "1.0")
51
+ so2 = st.text_input("SO2", "10.0")
52
+
53
+ o3 = st.text_input("O3 (Ozone)", "25.0")
54
+ benzene = st.text_input("Benzene", "5.0")
55
+
56
+
57
+ # Convert input values to a NumPy array (ensuring correct type)
58
+ try:
59
+ user_input = np.array([[float(pm25), float(pm10), float(no), float(no2), float(nox),
60
+ float(nh3), float(co), float(so2), float(o3), float(benzene),
61
+ ]])
62
+
63
+ # Predict AQI on button click
64
+ if st.button("Predict AQI"):
65
+ prediction = model.predict(user_input)[0]
66
+
67
+ # Display prediction with styling
68
+ st.success(f"🌍 **Predicted AQI:** {prediction:.2f}")
69
+
70
+ # Provide AQI category based on the value
71
+ if prediction <= 50:
72
+ st.info("**AQI Category: Good (🟢)**")
73
+ elif prediction <= 100:
74
+ st.info("**AQI Category: Satisfactory (🟡)**")
75
+ elif prediction <= 200:
76
+ st.warning("**AQI Category: Moderate (🟠)**")
77
+ elif prediction <= 300:
78
+ st.error("**AQI Category: Poor (🔴)**")
79
+ elif prediction <= 400:
80
+ st.error("**AQI Category: Very Poor (🟣)**")
81
+ else:
82
+ st.error("**AQI Category: Hazardous (⚫)**")
83
+
84
+ except ValueError:
85
+ st.error("❌ Please enter valid numerical values for all inputs.")
86
+
87
+
88
+
89
+
README.md CHANGED
@@ -1,12 +1,12 @@
1
  ---
2
- title: Air Quality Ml
3
- emoji: 👀
4
  colorFrom: yellow
5
- colorTo: green
6
  sdk: streamlit
7
- sdk_version: 1.45.0
8
- app_file: app.py
9
  pinned: false
10
  ---
11
 
12
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: AQI Prediction
3
+ emoji: 🦀
4
  colorFrom: yellow
5
+ colorTo: gray
6
  sdk: streamlit
7
+ sdk_version: 1.43.2
8
+ app_file: Model.py
9
  pinned: false
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
Unconfirmed 257564.crdownload ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ home = C:\Users\Kaustubh Yewale\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0
2
+ include-system-site-packages = false
3
+ version = 3.12.7
4
+ executable = C:\Users\Kaustubh Yewale\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\python.exe
5
+ command = C:\Users\Kaustubh Yewale\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\python.exe -m venv E:\Innomatics\machine learning\streamlit\streamlit_24_25
city_day.csv ADDED
The diff for this file is too large to render. See raw diff
 
data-collection-techniques.jpg ADDED
final.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:00ad355eaa4ddb730fe390beb17157e10e993219fc1fbc512c2dfb6ecc47616a
3
+ size 3154551
g.jpg ADDED

Git LFS Details

  • SHA256: d88dabc420fbaf09e7df25a0d75f088dd3d34f060450c248738bd7f7116cc2cf
  • Pointer size: 131 Bytes
  • Size of remote file: 198 kB
outlier.jpg ADDED
requirements.txt ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ altair==5.4.1
2
+ attrs==24.2.0
3
+ blinker==1.9.0
4
+ cachetools==5.5.0
5
+ certifi==2024.8.30
6
+ charset-normalizer==3.4.0
7
+ click==8.1.7
8
+ colorama==0.4.6
9
+ contourpy==1.3.1
10
+ cycler==0.12.1
11
+ fonttools==4.56.0
12
+ gitdb==4.0.11
13
+ GitPython==3.1.43
14
+ idna==3.10
15
+ Jinja2==3.1.4
16
+ joblib==1.4.2
17
+ jsonschema==4.23.0
18
+ jsonschema-specifications==2024.10.1
19
+ kiwisolver==1.4.8
20
+ markdown-it-py==3.0.0
21
+ MarkupSafe==3.0.2
22
+ matplotlib==3.10.1
23
+ mdurl==0.1.2
24
+ narwhals==1.14.1
25
+ numpy==2.1.3
26
+ packaging==24.2
27
+ pandas==2.2.3
28
+ pillow==11.0.0
29
+ protobuf==5.28.3
30
+ pyarrow==18.0.0
31
+ pydeck==0.9.1
32
+ Pygments==2.18.0
33
+ pyparsing==3.2.1
34
+ python-dateutil==2.9.0.post0
35
+ pytz==2024.2
36
+ referencing==0.35.1
37
+ requests==2.32.3
38
+ rich==13.9.4
39
+ rpds-py==0.21.0
40
+ scikit-learn==1.6.1
41
+ scipy==1.15.2
42
+ seaborn==0.13.2
43
+ six==1.16.0
44
+ smmap==5.0.1
45
+ streamlit==1.40.1
46
+ tenacity==9.0.0
47
+ threadpoolctl==3.6.0
48
+ toml==0.10.2
49
+ tornado==6.4.2
50
+ typing_extensions==4.12.2
51
+ tzdata==2024.2
52
+ urllib3==2.2.3
53
+ watchdog==6.0.0