KAPtechies commited on
Commit
674bf2a
·
verified ·
1 Parent(s): 86ef9f8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1068
app.py CHANGED
@@ -39,1074 +39,11 @@ def greet(year,co2_emission,No2_emission,so2_emission,Global_Warming,Methane_emi
39
  total1="2.29209688*(x1)+(-17.24834114)(x2)+(-34.46449984)(x3)+441.88734541(x4)+(-10.5704468)*(x5)+3032.3276611889232"
40
 
41
 
42
- #1997
43
-
44
- #data collection
45
- data2=pd.read_excel("ans1.xlsx")
46
- df2 = data2.drop(['YEAR '], axis=1)
47
-
48
-
49
-
50
- #data indexing
51
- x=df2.iloc[:,1:].values
52
- y=df2.iloc[:,0].values
53
- np.reshape(y,(-1,1))
54
-
55
- #split the dataset
56
- from sklearn.model_selection import train_test_split
57
- X_train, X_test, y_train, y_test = train_test_split(
58
- x, y, test_size=0.33, random_state=42)
59
-
60
-
61
- #traing the dataset
62
- from sklearn.linear_model import LinearRegression
63
-
64
- reg = LinearRegression().fit(X_train, y_train)
65
-
66
-
67
- y_pred2=reg.predict([[co2_emission,No2_emission,so2_emission,Global_Warming,Methane_emission]])
68
-
69
-
70
-
71
-
72
-
73
- #Equation
74
- total2="1.87191609*(x1)+19.64115875*(x2)+91.64048224*(x3)+188.38350818*(x4)+23.55498894*(x5)-10954.252919457198"
75
-
76
-
77
-
78
- #1998
79
-
80
- #data collection
81
- data3=pd.read_excel("ans2.xlsx")
82
- df3 = data3.drop([' YEAR '], axis=1)
83
-
84
-
85
-
86
- #data indexing
87
- x=df3.iloc[:,1:].values
88
- y=df3.iloc[:,0].values
89
- np.reshape(y,(-1,1))
90
-
91
- #split the dataset
92
- from sklearn.model_selection import train_test_split
93
- X_train, X_test, y_train, y_test = train_test_split(
94
- x, y, test_size=0.33, random_state=42)
95
-
96
-
97
- #traing the dataset
98
- from sklearn.linear_model import LinearRegression
99
-
100
- reg = LinearRegression().fit(X_train, y_train)
101
-
102
-
103
- y_pred3=reg.predict([[co2_emission,No2_emission,so2_emission,Global_Warming,Methane_emission]])
104
-
105
-
106
-
107
-
108
-
109
- #Equation
110
- total3="-16.16933055*(x1)+222.22199705*(x2)+137.12332335*(x3)+325.31073157*(x4)+(-123.63496668)*(x5)+56972.685015326366"
111
-
112
-
113
-
114
- #1999
115
-
116
- #data collection
117
- data4=pd.read_excel("ans3.xlsx")
118
- df4 = data4.drop([' YEAR '], axis=1)
119
-
120
-
121
-
122
- #data indexing
123
- x=df4.iloc[:,1:].values
124
- y=df4.iloc[:,0].values
125
- np.reshape(y,(-1,1))
126
-
127
- #split the dataset
128
- from sklearn.model_selection import train_test_split
129
- X_train, X_test, y_train, y_test = train_test_split(
130
- x, y, test_size=0.33, random_state=42)
131
-
132
-
133
- #traing the dataset
134
- from sklearn.linear_model import LinearRegression
135
-
136
- reg = LinearRegression().fit(X_train, y_train)
137
-
138
-
139
- y_pred4=reg.predict([[co2_emission,No2_emission,so2_emission,Global_Warming,Methane_emission]])
140
-
141
-
142
-
143
-
144
-
145
- #Equation
146
- total4="24.45036879*(x1)+(-30.15985323)(x2)+40.89603753(x3)+102.95011027*(x4)+(-26.35323684)*(x5)+7934.309705068432"
147
-
148
-
149
-
150
- #2000
151
-
152
- #data collection
153
- data5=pd.read_excel("ans4.xlsx")
154
- df5 = data5.drop([' YEAR '], axis=1)
155
-
156
-
157
-
158
- #data indexing
159
- x=df5.iloc[:,1:].values
160
- y=df5.iloc[:,0].values
161
- np.reshape(y,(-1,1))
162
-
163
- #split the dataset
164
- from sklearn.model_selection import train_test_split
165
- X_train, X_test, y_train, y_test = train_test_split(
166
- x, y, test_size=0.33, random_state=42)
167
-
168
-
169
- #traing the dataset
170
- from sklearn.linear_model import LinearRegression
171
-
172
- reg = LinearRegression().fit(X_train, y_train)
173
-
174
-
175
- y_pred5=reg.predict([[co2_emission,No2_emission,so2_emission,Global_Warming,Methane_emission]])
176
-
177
-
178
-
179
-
180
-
181
- #Equation
182
- total5="9.64446417*(x1)+1536.50170104*(x2)+(-43.51829088)(x3)+(-209.86341104)(x4)+(-56.82344007)*(x5)+21672.006533155447"
183
-
184
-
185
-
186
- #2001
187
-
188
- #data collection
189
- data6=pd.read_excel("ans5.xlsx")
190
- df6 = data6.drop([' YEAR '], axis=1)
191
-
192
-
193
-
194
- #data indexing
195
- x=df6.iloc[:,1:].values
196
- y=df6.iloc[:,0].values
197
- np.reshape(y,(-1,1))
198
-
199
- #split the dataset
200
- from sklearn.model_selection import train_test_split
201
- X_train, X_test, y_train, y_test = train_test_split(
202
- x, y, test_size=0.33, random_state=42)
203
-
204
-
205
- #traing the dataset
206
- from sklearn.linear_model import LinearRegression
207
-
208
- reg = LinearRegression().fit(X_train, y_train)
209
-
210
-
211
- y_pred6=reg.predict([[co2_emission,No2_emission,so2_emission,Global_Warming,Methane_emission]])
212
-
213
-
214
-
215
-
216
-
217
- #Equation
218
- total6="(-17.95980305)(x1)+397.29027184(x2)+332.85116421*(x3)+176.63505073*(x4)+(-100.69005777)*(x5)+47882.75497380103"
219
-
220
-
221
- #2002
222
-
223
- #data collection
224
- data7=pd.read_excel("ans6.xlsx")
225
- df7 = data7.drop([' YEAR '], axis=1)
226
-
227
-
228
-
229
- #data indexing
230
- x=df7.iloc[:,1:].values
231
- y=df7.iloc[:,0].values
232
- np.reshape(y,(-1,1))
233
-
234
- #split the dataset
235
- from sklearn.model_selection import train_test_split
236
- X_train, X_test, y_train, y_test = train_test_split(
237
- x, y, test_size=0.33, random_state=42)
238
-
239
-
240
- #traing the dataset
241
- from sklearn.linear_model import LinearRegression
242
-
243
- reg = LinearRegression().fit(X_train, y_train)
244
-
245
-
246
- y_pred7=reg.predict([[co2_emission,No2_emission,so2_emission,Global_Warming,Methane_emission]])
247
-
248
-
249
-
250
-
251
-
252
- #Equation
253
- total7="4.08573322*(x1)+531.87792204*(x2)+(-17.3614085 )(x3)+(-11.17919737)(x4)+(-53.48796076)*(x5)+22953.88111229325"
254
-
255
-
256
- #2003
257
-
258
- #data collection
259
- data8=pd.read_excel("ans7.xlsx")
260
- df8 = data8.drop([' YEAR '], axis=1)
261
-
262
-
263
-
264
- #data indexing
265
- x=df8.iloc[:,1:].values
266
- y=df8.iloc[:,0].values
267
- np.reshape(y,(-1,1))
268
-
269
- #split the dataset
270
- from sklearn.model_selection import train_test_split
271
- X_train, X_test, y_train, y_test = train_test_split(
272
- x, y, test_size=0.33, random_state=42)
273
-
274
-
275
- #traing the dataset
276
- from sklearn.linear_model import LinearRegression
277
-
278
- reg = LinearRegression().fit(X_train, y_train)
279
-
280
-
281
- y_pred8=reg.predict([[co2_emission,No2_emission,so2_emission,Global_Warming,Methane_emission]])
282
-
283
-
284
-
285
-
286
-
287
- #Equation
288
- total8="31.82512443*(x1)+(-521.96868383 )(x2)+(-43.51829088)(x3)+ 205.27514768 (x4)+(-97.91577198)(x5)+37973.451433772294"
289
-
290
-
291
-
292
- #2004
293
-
294
- #data collection
295
- data9=pd.read_excel("ans8.xlsx")
296
- df9 = data9.drop([' YEAR '], axis=1)
297
-
298
-
299
-
300
- #data indexing
301
- x=df9.iloc[:,1:].values
302
- y=df9.iloc[:,0].values
303
- np.reshape(y,(-1,1))
304
-
305
- #split the dataset
306
- from sklearn.model_selection import train_test_split
307
- X_train, X_test, y_train, y_test = train_test_split(
308
- x, y, test_size=0.33, random_state=42)
309
-
310
-
311
- #traing the dataset
312
- from sklearn.linear_model import LinearRegression
313
-
314
- reg = LinearRegression().fit(X_train, y_train)
315
-
316
-
317
- y_pred9=reg.predict([[co2_emission,No2_emission,so2_emission,Global_Warming,Methane_emission]])
318
-
319
-
320
-
321
-
322
-
323
- #Equation
324
- total9="9.64446417*(x1)+1536.50170104*(x2)+(-43.51829088)(x3)+(-209.86341104)(x4)+(-56.82344007)*(x5)+21672.006533155447"
325
-
326
-
327
-
328
- #2005
329
-
330
- #data collection
331
- data10=pd.read_excel("ans9.xlsx")
332
- df10 = data10.drop([' YEAR '], axis=1)
333
-
334
-
335
-
336
- #data indexing
337
- x=df10.iloc[:,1:].values
338
- y=df10.iloc[:,0].values
339
- np.reshape(y,(-1,1))
340
-
341
- #split the dataset
342
- from sklearn.model_selection import train_test_split
343
- X_train, X_test, y_train, y_test = train_test_split(
344
- x, y, test_size=0.33, random_state=42)
345
-
346
-
347
- #traing the dataset
348
- from sklearn.linear_model import LinearRegression
349
-
350
- reg = LinearRegression().fit(X_train, y_train)
351
-
352
-
353
- y_pred10=reg.predict([[co2_emission,No2_emission,so2_emission,Global_Warming,Methane_emission]])
354
-
355
-
356
-
357
-
358
-
359
- #Equation
360
- total10="(-46.41395388)(x1)+27.19076539(x2)+(442.44336049)(x3)+(-205.61881527)(x4)+120.39426307*(x5)-46289.48823133327"
361
-
362
-
363
-
364
- #2006
365
-
366
- #data collection
367
- data11=pd.read_excel("ans10.xlsx")
368
- df11 = data11.drop([' YEAR '], axis=1)
369
-
370
-
371
-
372
- #data indexing
373
- x=df11.iloc[:,1:].values
374
- y=df11.iloc[:,0].values
375
- np.reshape(y,(-1,1))
376
-
377
- #split the dataset
378
- from sklearn.model_selection import train_test_split
379
- X_train, X_test, y_train, y_test = train_test_split(
380
- x, y, test_size=0.33, random_state=42)
381
-
382
-
383
- #traing the dataset
384
- from sklearn.linear_model import LinearRegression
385
-
386
- reg = LinearRegression().fit(X_train, y_train)
387
-
388
-
389
- y_pred11=reg.predict([[co2_emission,No2_emission,so2_emission,Global_Warming,Methane_emission]])
390
-
391
-
392
-
393
-
394
-
395
- #Equation
396
- total11="(-15.45736104)(x1)+23.92398419(x2)+334.30252317*(x3)+151.55678804*(x4)+(-66.42769537)*(x5)+29294.014037250927"
397
-
398
-
399
-
400
-
401
- #2007
402
-
403
- #data collection
404
- data12=pd.read_excel("ans11.xlsx")
405
- df12 = data12.drop([' YEAR '], axis=1)
406
-
407
-
408
-
409
- #data indexing
410
- x=df12.iloc[:,1:].values
411
- y=df12.iloc[:,0].values
412
- np.reshape(y,(-1,1))
413
-
414
- #split the dataset
415
- from sklearn.model_selection import train_test_split
416
- X_train, X_test, y_train, y_test = train_test_split(
417
- x, y, test_size=0.33, random_state=42)
418
-
419
-
420
- #traing the dataset
421
- from sklearn.linear_model import LinearRegression
422
-
423
- reg = LinearRegression().fit(X_train, y_train)
424
-
425
-
426
- y_pred12=reg.predict([[co2_emission,No2_emission,so2_emission,Global_Warming,Methane_emission]])
427
-
428
-
429
-
430
-
431
-
432
- #Equation
433
- total12="33.41323832*(x1)+(-36.18735569)(x2)+768.11444325(x3)+(-182.42626044 )(x4)+(14.70116631)(x5)-6967.764713347897"
434
-
435
-
436
-
437
- #2008
438
-
439
- #data collection
440
- data13=pd.read_excel("ans12.xlsx")
441
- df13 = data13.drop([' YEAR '], axis=1)
442
-
443
-
444
-
445
- #data indexing
446
- x=df13.iloc[:,1:].values
447
- y=df13.iloc[:,0].values
448
- np.reshape(y,(-1,1))
449
-
450
- #split the dataset
451
- from sklearn.model_selection import train_test_split
452
- X_train, X_test, y_train, y_test = train_test_split(
453
- x, y, test_size=0.33, random_state=42)
454
-
455
-
456
- #traing the dataset
457
- from sklearn.linear_model import LinearRegression
458
-
459
- reg = LinearRegression().fit(X_train, y_train)
460
-
461
-
462
- y_pred13=reg.predict([[co2_emission,No2_emission,so2_emission,Global_Warming,Methane_emission]])
463
-
464
-
465
-
466
-
467
-
468
- #Equation
469
- total13="180.34683409 (x1)+49.48628012(x2)+152.71729516*(x3)+( -174.89679207)(x4)+(-144.40854904)(x5)+30420.505686819404"
470
-
471
-
472
-
473
-
474
-
475
- #2009
476
-
477
- #data collection
478
- data14=pd.read_excel("ans13.xlsx")
479
- df14 = data14.drop([' YEAR '], axis=1)
480
-
481
-
482
-
483
- #data indexing
484
- x=df14.iloc[:,1:].values
485
- y=df14.iloc[:,0].values
486
- np.reshape(y,(-1,1))
487
-
488
- #split the dataset
489
- from sklearn.model_selection import train_test_split
490
- X_train, X_test, y_train, y_test = train_test_split(
491
- x, y, test_size=0.33, random_state=42)
492
-
493
-
494
- #traing the dataset
495
- from sklearn.linear_model import LinearRegression
496
-
497
- reg = LinearRegression().fit(X_train, y_train)
498
-
499
-
500
- y_pred14=reg.predict([[co2_emission,No2_emission,so2_emission,Global_Warming,Methane_emission]])
501
-
502
-
503
-
504
-
505
-
506
- #Equation
507
- total14="17.11355138 (x1)+37.59837451(x2)+156.43469383*(x3)+(-104.8362236)(x4)+81.10973597(x5)-38919.678559060834"
508
-
509
-
510
-
511
-
512
- #2010
513
-
514
- #data collection
515
- data15=pd.read_excel("ans14.xlsx")
516
- df15 = data15.drop([' YEAR '], axis=1)
517
-
518
-
519
-
520
- #data indexing
521
- x=df15.iloc[:,1:].values
522
- y=df15.iloc[:,0].values
523
- np.reshape(y,(-1,1))
524
-
525
- #split the dataset
526
- from sklearn.model_selection import train_test_split
527
- X_train, X_test, y_train, y_test = train_test_split(
528
- x, y, test_size=0.33, random_state=42)
529
-
530
-
531
- #traing the dataset
532
- from sklearn.linear_model import LinearRegression
533
-
534
- reg = LinearRegression().fit(X_train, y_train)
535
-
536
-
537
- y_pred15=reg.predict([[co2_emission,No2_emission,so2_emission,Global_Warming,Methane_emission]])
538
-
539
-
540
-
541
-
542
-
543
- #Equation
544
- total15="39.06418699 (x1)+148.53455807(x2)+14.69213499 (x3)+107.43795246(x4)+(-207.77185028)*(x5)+82358.63651384937"
545
-
546
-
547
-
548
-
549
- #2011
550
-
551
- #data collection
552
- data16=pd.read_excel("ans15.xlsx")
553
- df16 = data16.drop([' YEAR '], axis=1)
554
-
555
-
556
-
557
- #data indexing
558
- x=df16.iloc[:,1:].values
559
- y=df16.iloc[:,0].values
560
- np.reshape(y,(-1,1))
561
-
562
- #split the dataset
563
- from sklearn.model_selection import train_test_split
564
- X_train, X_test, y_train, y_test = train_test_split(
565
- x, y, test_size=0.33, random_state=42)
566
-
567
-
568
- #traing the dataset
569
- from sklearn.linear_model import LinearRegression
570
-
571
- reg = LinearRegression().fit(X_train, y_train)
572
-
573
-
574
- y_pred16=reg.predict([[co2_emission,No2_emission,so2_emission,Global_Warming,Methane_emission]])
575
-
576
-
577
-
578
-
579
-
580
- #Equation
581
- total16="36.2551509 (x1)+-21.16118114(x2)+372.06856269*(x3)+(-59.04384028)(x4)+(-49.61395171)(x5)+18259.681897588325"
582
-
583
-
584
-
585
-
586
- #2012
587
-
588
- #data collection
589
- data17=pd.read_excel("ans16.xlsx")
590
- df17 = data17.drop([' YEAR '], axis=1)
591
-
592
-
593
-
594
- #data indexing
595
- x=df17.iloc[:,1:].values
596
- y=df17.iloc[:,0].values
597
- np.reshape(y,(-1,1))
598
-
599
- #split the dataset
600
- from sklearn.model_selection import train_test_split
601
- X_train, X_test, y_train, y_test = train_test_split(
602
- x, y, test_size=0.33, random_state=42)
603
-
604
-
605
- #traing the dataset
606
- from sklearn.linear_model import LinearRegression
607
-
608
- reg = LinearRegression().fit(X_train, y_train)
609
-
610
-
611
- y_pred17=reg.predict([[co2_emission,No2_emission,so2_emission,Global_Warming,Methane_emission]])
612
-
613
-
614
-
615
-
616
-
617
- #Equation
618
- total17="76.15862868 (x1)+24.66304806(x2)+(-31.1753211)(x3)+(-281.13550722 )(x4)+48.76763872*(x5)-27641.15357666507"
619
-
620
-
621
-
622
- #2013
623
-
624
- #data collection
625
- data18=pd.read_excel("ans17.xlsx")
626
- df18 = data18.drop([' YEAR '], axis=1)
627
-
628
-
629
-
630
- #data indexing
631
- x=df18.iloc[:,1:].values
632
- y=df18.iloc[:,0].values
633
- np.reshape(y,(-1,1))
634
-
635
- #split the dataset
636
- from sklearn.model_selection import train_test_split
637
- X_train, X_test, y_train, y_test = train_test_split(
638
- x, y, test_size=0.33, random_state=42)
639
-
640
-
641
- #traing the dataset
642
- from sklearn.linear_model import LinearRegression
643
-
644
- reg = LinearRegression().fit(X_train, y_train)
645
-
646
-
647
- y_pred18=reg.predict([[co2_emission,No2_emission,so2_emission,Global_Warming,Methane_emission]])
648
-
649
-
650
-
651
-
652
-
653
- #Equation
654
- total18="138.94519275 (x1)+19.41784298(x2)+160.13405515*(x3)+1190.40134987*(x4)+(-787.72926112)*(x5)+340350.32984524494"
655
-
656
-
657
-
658
-
659
-
660
- #2014
661
-
662
- #data collection
663
- data19=pd.read_excel("ans18.xlsx")
664
- df19 = data19.drop([' YEAR '], axis=1)
665
-
666
-
667
-
668
- #data indexing
669
- x=df19.iloc[:,1:].values
670
- y=df19.iloc[:,0].values
671
- np.reshape(y,(-1,1))
672
-
673
- #split the dataset
674
- from sklearn.model_selection import train_test_split
675
- X_train, X_test, y_train, y_test = train_test_split(
676
- x, y, test_size=0.33, random_state=42)
677
-
678
-
679
- #traing the dataset
680
- from sklearn.linear_model import LinearRegression
681
-
682
- reg = LinearRegression().fit(X_train, y_train)
683
-
684
-
685
- y_pred19=reg.predict([[co2_emission,No2_emission,so2_emission,Global_Warming,Methane_emission]])
686
-
687
-
688
-
689
-
690
-
691
- #Equation
692
- total19="83.98184027*(x1)+61.59628945*(x2)+740.33672736*(x3)+(-347.39343539)(x4)+(-293.6388187)(x5)+121547.59923111903"
693
-
694
-
695
-
696
-
697
-
698
- #2015
699
-
700
- #data collection
701
- data20=pd.read_excel("ans19.xlsx")
702
- df20 = data20.drop([' YEAR '], axis=1)
703
-
704
-
705
-
706
- #data indexing
707
- x=df20.iloc[:,1:].values
708
- y=df20.iloc[:,0].values
709
- np.reshape(y,(-1,1))
710
-
711
- #split the dataset
712
- from sklearn.model_selection import train_test_split
713
- X_train, X_test, y_train, y_test = train_test_split(
714
- x, y, test_size=0.33, random_state=42)
715
-
716
-
717
- #traing the dataset
718
- from sklearn.linear_model import LinearRegression
719
-
720
- reg = LinearRegression().fit(X_train, y_train)
721
-
722
-
723
- y_pred20=reg.predict([[co2_emission,No2_emission,so2_emission,Global_Warming,Methane_emission]])
724
-
725
-
726
-
727
-
728
-
729
- #Equation
730
- total20="25.74397202*(x1)+(-109.5936775)(x2)+293.36826631(x3)+(-52.97554351)(x4)+178.24908664(x5)-80332.13002824014"
731
-
732
-
733
-
734
-
735
-
736
-
737
-
738
- #2016
739
-
740
- #data collection
741
- data21=pd.read_excel("ans20.xlsx")
742
- df21 = data21.drop([' YEAR '], axis=1)
743
-
744
-
745
-
746
- #data indexing
747
- x=df21.iloc[:,1:].values
748
- y=df21.iloc[:,0].values
749
- np.reshape(y,(-1,1))
750
-
751
- #split the dataset
752
- from sklearn.model_selection import train_test_split
753
- X_train, X_test, y_train, y_test = train_test_split(
754
- x, y, test_size=0.33, random_state=42)
755
-
756
-
757
- #traing the dataset
758
- from sklearn.linear_model import LinearRegression
759
-
760
- reg = LinearRegression().fit(X_train, y_train)
761
-
762
-
763
- y_pred21=reg.predict([[co2_emission,No2_emission,so2_emission,Global_Warming,Methane_emission]])
764
-
765
-
766
-
767
-
768
-
769
- #Equation
770
- total21="-9.33709575 (x1)+(-60.54283141)(x2)+1291.89291784*(x3)+112.70137053*(x4)+167.06117048*(x5)-76365.90014799789"
771
-
772
-
773
-
774
-
775
-
776
- #2017
777
-
778
- #data collection
779
- data22=pd.read_excel("ans21.xlsx")
780
- df22 = data22.drop([' YEAR '], axis=1)
781
-
782
-
783
-
784
- #data indexing
785
- x=df22.iloc[:,1:].values
786
- y=df22.iloc[:,0].values
787
- np.reshape(y,(-1,1))
788
-
789
- #split the dataset
790
- from sklearn.model_selection import train_test_split
791
- X_train, X_test, y_train, y_test = train_test_split(
792
- x, y, test_size=0.33, random_state=42)
793
-
794
-
795
- #traing the dataset
796
- from sklearn.linear_model import LinearRegression
797
-
798
- reg = LinearRegression().fit(X_train, y_train)
799
-
800
-
801
- y_pred22=reg.predict([[co2_emission,No2_emission,so2_emission,Global_Warming,Methane_emission]])
802
-
803
-
804
-
805
-
806
-
807
- #Equation
808
- total22="-12.58553956 (x1)+54.81099258(x2)+224.41124874*(x3)+437.35226861*(x4)+(-160.78658794)*(x5)+68323.07737183299"
809
-
810
-
811
-
812
-
813
-
814
- #2018
815
-
816
- #data collection
817
- data23=pd.read_excel("ans22.xlsx")
818
- df23 = data23.drop([' YEAR '], axis=1)
819
-
820
-
821
-
822
- #data indexing
823
- x=df23.iloc[:,1:].values
824
- y=df23.iloc[:,0].values
825
- np.reshape(y,(-1,1))
826
-
827
- #split the dataset
828
- from sklearn.model_selection import train_test_split
829
- X_train, X_test, y_train, y_test = train_test_split(
830
- x, y, test_size=0.33, random_state=42)
831
-
832
-
833
- #traing the dataset
834
- from sklearn.linear_model import LinearRegression
835
-
836
- reg = LinearRegression().fit(X_train, y_train)
837
-
838
-
839
- y_pred23=reg.predict([[co2_emission,No2_emission,so2_emission,Global_Warming,Methane_emission]])
840
-
841
-
842
-
843
-
844
-
845
- #Equation
846
- total23="73.20314723*(x1)+158.24671048*(x2)+(-3876.80695302)(x3)+356.25236863(x4)+(-195.73184137)*(x5)+85757.9509512224"
847
-
848
-
849
-
850
-
851
- #2019
852
-
853
- #data collection
854
- data24=pd.read_excel("ans23.xlsx")
855
- df24 = data24.drop([' YEAR '], axis=1)
856
-
857
-
858
-
859
- #data indexing
860
- x=df24.iloc[:,1:].values
861
- y=df24.iloc[:,0].values
862
- np.reshape(y,(-1,1))
863
-
864
- #split the dataset
865
- from sklearn.model_selection import train_test_split
866
- X_train, X_test, y_train, y_test = train_test_split(
867
- x, y, test_size=0.33, random_state=42)
868
-
869
-
870
- #traing the dataset
871
- from sklearn.linear_model import LinearRegression
872
-
873
- reg = LinearRegression().fit(X_train, y_train)
874
-
875
-
876
- y_pred24=reg.predict([[co2_emission,No2_emission,so2_emission,Global_Warming,Methane_emission]])
877
-
878
-
879
-
880
-
881
-
882
- #Equation
883
- total24="104.06131346*(x1)+110.40576115*(x2)+(-3143.30201973)(x3)+(-466.5687285)(x4)+(-40.30732688)*(x5)+6946.199087391373"
884
-
885
-
886
-
887
-
888
-
889
- #2020
890
-
891
- #data collection
892
- data25=pd.read_excel("ans24.xlsx")
893
- df25 = data25.drop([' YEAR '], axis=1)
894
-
895
-
896
-
897
- #data indexing
898
- x=df25.iloc[:,1:].values
899
- y=df25.iloc[:,0].values
900
- np.reshape(y,(-1,1))
901
-
902
- #split the dataset
903
- from sklearn.model_selection import train_test_split
904
- X_train, X_test, y_train, y_test = train_test_split(
905
- x, y, test_size=0.33, random_state=42)
906
-
907
-
908
- #traing the dataset
909
- from sklearn.linear_model import LinearRegression
910
-
911
- reg = LinearRegression().fit(X_train, y_train)
912
-
913
-
914
- y_pred25=reg.predict([[co2_emission,No2_emission,so2_emission,Global_Warming,Methane_emission]])
915
-
916
-
917
-
918
-
919
-
920
- #Equation
921
- total25="22.78813682*(x1)+46.1536507*(x2)+78.00814512*(x3)+(-71.38031119)(x4)+(-37.57839411)(x5)+12559.184605195129"
922
-
923
-
924
-
925
-
926
-
927
- #2021
928
-
929
- #data collection
930
- data26=pd.read_excel("ans25.xlsx")
931
- df26 = data26.drop([' YEAR '], axis=1)
932
-
933
-
934
-
935
- #data indexing
936
- x=df26.iloc[:,1:].values
937
- y=df26.iloc[:,0].values
938
- np.reshape(y,(-1,1))
939
-
940
- #split the dataset
941
- from sklearn.model_selection import train_test_split
942
- X_train, X_test, y_train, y_test = train_test_split(
943
- x, y, test_size=0.33, random_state=42)
944
-
945
-
946
- #traing the dataset
947
- from sklearn.linear_model import LinearRegression
948
-
949
- reg = LinearRegression().fit(X_train, y_train)
950
-
951
-
952
- y_pred26=reg.predict([[co2_emission,No2_emission,so2_emission,Global_Warming,Methane_emission]])
953
-
954
-
955
-
956
-
957
-
958
- #Equation
959
- total26="63.70545758*(x1)+9.57432502*(x2)+1734.12898357*(x3)+(-230.53815238)(x4)+93.1299683(x5)-51860.81441391745"
960
-
961
-
962
-
963
-
964
-
965
- #2022
966
-
967
- #data collection
968
- data27=pd.read_excel("ans26.xlsx")
969
- df27 = data27.drop([' YEAR '], axis=1)
970
-
971
-
972
-
973
- #data indexing
974
- x=df27.iloc[:,1:].values
975
- y=df27.iloc[:,0].values
976
- np.reshape(y,(-1,1))
977
-
978
- #split the dataset
979
- from sklearn.model_selection import train_test_split
980
- X_train, X_test, y_train, y_test = train_test_split(
981
- x, y, test_size=0.33, random_state=42)
982
-
983
-
984
- #traing the dataset
985
- from sklearn.linear_model import LinearRegression
986
-
987
- reg = LinearRegression().fit(X_train, y_train)
988
-
989
-
990
- y_pred27=reg.predict([[co2_emission,No2_emission,so2_emission,Global_Warming,Methane_emission]])
991
-
992
-
993
- #Equation
994
- total27="15.98972327*(x1)+5568.67299429*(x2)+79.28661735*(x3)+16.79333316*(x4)+(-87.10169494)*(x5)+40155.32700035415"
995
-
996
-
997
- #above 2023
998
- data28=pd.read_excel("bara shigiri - Copy.xlsx")
999
-
1000
- #data indexing
1001
- x=data28.iloc[:,1:].values
1002
- y=data28.iloc[:,0].values
1003
- np.reshape(y,(-1,1))
1004
-
1005
- #split the dataset
1006
- from sklearn.model_selection import train_test_split
1007
- X_train, X_test, y_train, y_test = train_test_split(
1008
- x, y, test_size=0.33, random_state=42)
1009
-
1010
- #training the dataset
1011
- from sklearn.linear_model import LinearRegression
1012
-
1013
- reg = LinearRegression().fit(X_train, y_train)
1014
- y_pred28=reg.predict([[co2_emission,No2_emission,so2_emission,Global_Warming,Methane_emission]])
1015
-
1016
-
1017
-
1018
-
1019
- #Equation
1020
- total28="-1.50608097*(x1)+10.05272793*(x2)+(-10.52662062)(x3)+336.60218769(x4)+(-23.82408478)*(x5)+12129.976853563849"
1021
-
1022
-
1023
  #app section
1024
  if(year==1996):
1025
  return total1,y_pred1
1026
 
1027
- elif(year==1997):
1028
- return total2,y_pred2
1029
-
1030
- elif(year==1998):
1031
- return total3,y_pred3
1032
-
1033
- elif(year==1999):
1034
- return total4,y_pred4
1035
-
1036
- elif(year==2000):
1037
- return total5,y_pred5
1038
-
1039
- elif(year==2001):
1040
- return total6,y_pred6
1041
-
1042
- elif(year==2002):
1043
- return total7,y_pred7
1044
-
1045
- elif(year==2003):
1046
- return total8,y_pred8
1047
-
1048
- elif(year==2004):
1049
- return total9,y_pred9
1050
-
1051
- elif(year==2005):
1052
- return total10,y_pred10
1053
-
1054
- elif(year==2006):
1055
- return total11,y_pred11
1056
-
1057
- elif(year==2007):
1058
- return total12,y_pred12
1059
-
1060
- elif(year==2008):
1061
- return total13,y_pred13
1062
-
1063
- elif(year==2009):
1064
- return total14,y_pred14
1065
-
1066
- elif(year==2010):
1067
- return total15,y_pred15
1068
-
1069
- elif(year==2011):
1070
- return total16,y_pred16
1071
-
1072
- elif(year==2012):
1073
- return total17,y_pred17
1074
-
1075
- elif(year==2013):
1076
- return total18,y_pred18
1077
-
1078
- elif(year==2014):
1079
- return total19,y_pred19
1080
-
1081
- elif(year==2015):
1082
- return total20,y_pred20
1083
-
1084
- elif(year==2016):
1085
- return total21,y_pred21
1086
-
1087
- elif(year==2017):
1088
- return total22,y_pred22
1089
-
1090
- elif(year==2018):
1091
- return total23,y_pred23
1092
-
1093
- elif(year==2019):
1094
- return total24,y_pred24
1095
-
1096
- elif(year==2020):
1097
- return total25,y_pred25
1098
-
1099
- elif(year==2021):
1100
- return total26,y_pred26
1101
-
1102
- elif(year==2022):
1103
- return total27,y_pred27
1104
-
1105
- elif(year>=2023):
1106
- return total28,y_pred28
1107
 
1108
- else:
1109
- return "no",0
1110
 
1111
 
1112
  demo = gr.Interface(
@@ -1114,10 +51,6 @@ demo = gr.Interface(
1114
  inputs=['number','number','number','number','number','number'],
1115
  outputs=['text','number'],
1116
  title="BARA SHIGRI",
1117
- description="Bara Shigri feeds the Chandra River which after its confluence at Tandi with the Bhaga River is known as Chandrabhaga or Chenab."
1118
- "According to Hugh Whistler’s 1924 writing, Shigri is applied par-excellence to one particular glacier that emerges from the mountains on the left bank of the Chenab. It is said to be several miles long, and the snout reaches right down to the river, lying athwart the customary road from Kulu to Spiti... In 1836 this glacier dammed the Chenab River, causing the formation of a large lake, which eventually broke loose and carried devastation down the valley."
1119
- "Across the Bara Shigri is another glacier known as Chhota Shigri. It is, as the name suggests, a comparatively smaller glacier.",
1120
- css='div {background-image: url("https://drive.google.com/uc?export=view&id=1gQA86IDVYGmnXAccJHnULm3V99jn7sUn");background-size: 2000px 2000px;}'
1121
  )
1122
 
1123
- demo.launch(inline=False)
 
39
  total1="2.29209688*(x1)+(-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  return total1,y_pred1
45
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
 
 
 
47
 
48
 
49
  demo = gr.Interface(
 
51
  inputs=['number','number','number','number','number','number'],
52
  outputs=['text','number'],
53
  title="BARA SHIGRI",
 
 
 
 
54
  )
55
 
56
+ demo.launch()