Kartheesh commited on
Commit
836ddd5
1 Parent(s): ef7bc03

Update app.py

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