Kartheesh commited on
Commit
8c38810
1 Parent(s): 4dc5d6f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -0
app.py CHANGED
@@ -1,6 +1,25 @@
1
  import gradio as gr
2
 
3
  def greet(year,co2_emission,No2_emission,so2_emission,Global_Warming,Methane_emission):
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
 
5
 
6
 
 
1
  import gradio as gr
2
 
3
  def greet(year,co2_emission,No2_emission,so2_emission,Global_Warming,Methane_emission):
4
+ df1 = data1.drop(['YEAR'], axis=1)
5
+
6
+
7
+
8
+ #data indexing
9
+ x=df1.iloc[:,1:].values
10
+ y=df1.iloc[:,0].values
11
+ np.reshape(y,(-1,1))
12
+
13
+ #split the dataset
14
+ from sklearn.model_selection import train_test_split
15
+ X_train, X_test, y_train, y_test = train_test_split(
16
+ x, y, test_size=0.33, random_state=42)
17
+
18
+
19
+ #traing the dataset
20
+ from sklearn.linear_model import LinearRegression
21
+
22
+ reg = LinearRegression().fit(X_train, y_train)
23
 
24
 
25