Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
5 |
-
|
6 |
-
|
7 |
|
8 |
|
9 |
-
|
10 |
-
|
|
|
|
|
|
|
11 |
|
12 |
-
|
|
|
|
|
|
|
|
|
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 |
|