Spaces:
Runtime error
Runtime error
Mustafa Al Hamad
commited on
Commit
•
1a1dab4
1
Parent(s):
d34e24d
Update app.py
Browse files
app.py
CHANGED
@@ -101,17 +101,6 @@ cities = ['Assir',
|
|
101 |
'Riyadh',
|
102 |
'Tabuk']
|
103 |
|
104 |
-
dt = datetime(currentYear, currentMonth, currentDay, tzinfo=ZoneInfo("Asia/Riyadh"))
|
105 |
-
fulltime = str(dt)
|
106 |
-
ADD = 0
|
107 |
-
try:
|
108 |
-
if "+" in fulltime:
|
109 |
-
ADD = int(fulltime.split("+")[1].split(":")[0])
|
110 |
-
elif "-" in fulltime:
|
111 |
-
ADD = int(fulltime.split("-")[1].split(":")[0]) * -1
|
112 |
-
except:
|
113 |
-
pass
|
114 |
-
|
115 |
def predict(city,month,year,day,hour,minute,weathertype,wind,hu,baro,vis):
|
116 |
|
117 |
loaded_model = pickle.load(open("WeatherPredictionKSA.pk", 'rb'))
|
@@ -136,6 +125,16 @@ with gr.Blocks() as demo:
|
|
136 |
currentDay = datetime.now().day
|
137 |
currentMonth = datetime.now().month
|
138 |
currentYear = datetime.now().year
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
139 |
with gr.Row():
|
140 |
gr.Markdown("# 🌧️☁️☀️KSA Weather prediction ☀️☁️🌧️\n**Day, Hour, and Minute** are set to **Asia/Riyadh** current time by default but can be changed")
|
141 |
with gr.Box():
|
|
|
101 |
'Riyadh',
|
102 |
'Tabuk']
|
103 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
104 |
def predict(city,month,year,day,hour,minute,weathertype,wind,hu,baro,vis):
|
105 |
|
106 |
loaded_model = pickle.load(open("WeatherPredictionKSA.pk", 'rb'))
|
|
|
125 |
currentDay = datetime.now().day
|
126 |
currentMonth = datetime.now().month
|
127 |
currentYear = datetime.now().year
|
128 |
+
dt = datetime(currentYear, currentMonth, currentDay, tzinfo=ZoneInfo("Asia/Riyadh"))
|
129 |
+
fulltime = str(dt)
|
130 |
+
ADD = 0
|
131 |
+
try:
|
132 |
+
if "+" in fulltime:
|
133 |
+
ADD = int(fulltime.split("+")[1].split(":")[0])
|
134 |
+
elif "-" in fulltime:
|
135 |
+
ADD = int(fulltime.split("-")[1].split(":")[0]) * -1
|
136 |
+
except:
|
137 |
+
pass
|
138 |
with gr.Row():
|
139 |
gr.Markdown("# 🌧️☁️☀️KSA Weather prediction ☀️☁️🌧️\n**Day, Hour, and Minute** are set to **Asia/Riyadh** current time by default but can be changed")
|
140 |
with gr.Box():
|