Kartheesh commited on
Commit
24a8d91
·
1 Parent(s): 7d242db

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -25
app.py CHANGED
@@ -4,32 +4,7 @@ import numpy as np
4
  import pandas as pd
5
  def greet(year,co2_emission,No2_emission,so2_emission,Global_Warming,Methane_emission):
6
 
7
- #1996
8
 
9
- #data collection
10
- data1=pd.read_excel("/content/FINAL_DATASET.xlsx")
11
- df1 = data1.drop(['YEAR'], axis=1)
12
-
13
-
14
-
15
- #data indexing
16
- x=df1.iloc[:,1:].values
17
- y=df1.iloc[:,0].values
18
- np.reshape(y,(-1,1))
19
-
20
- #split the dataset
21
- from sklearn.model_selection import train_test_split
22
- X_train, X_test, y_train, y_test = train_test_split(
23
- x, y, test_size=0.33, random_state=42)
24
-
25
-
26
- #traing the dataset
27
- from sklearn.linear_model import LinearRegression
28
-
29
- reg = LinearRegression().fit(X_train, y_train)
30
-
31
-
32
- y_pred1=reg.predict([[co2_emission,No2_emission,so2_emission,Global_Warming,Methane_emission]])
33
 
34
 
35
 
 
4
  import pandas as pd
5
  def greet(year,co2_emission,No2_emission,so2_emission,Global_Warming,Methane_emission):
6
 
 
7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
 
9
 
10