Spaces:
Runtime error
Runtime error
Orangefish00
commited on
Commit
·
b5d0c55
1
Parent(s):
b554613
Update app.py
Browse files
app.py
CHANGED
@@ -20,8 +20,9 @@ def greet(name):
|
|
20 |
version = 1
|
21 |
)
|
22 |
|
23 |
-
start_time =
|
24 |
-
|
|
|
25 |
|
26 |
|
27 |
X = feature_view.get_batch_data(start_time=start_time)
|
@@ -42,11 +43,22 @@ def greet(name):
|
|
42 |
|
43 |
next_day_date = datetime.today() + timedelta(days=1)
|
44 |
next_day = next_day_date.strftime ('%d/%m/%Y')
|
45 |
-
|
46 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
|
48 |
|
49 |
demo = gr.Interface(fn=greet, inputs="text", outputs="text")
|
|
|
|
|
50 |
|
51 |
if __name__ == "__main__":
|
52 |
demo.launch()
|
|
|
20 |
version = 1
|
21 |
)
|
22 |
|
23 |
+
start_time = 1668985200000
|
24 |
+
#start_date = datetime.now() - timedelta(days=1)
|
25 |
+
#start_time = int(start_date.timestamp()) * 1000
|
26 |
|
27 |
|
28 |
X = feature_view.get_batch_data(start_time=start_time)
|
|
|
43 |
|
44 |
next_day_date = datetime.today() + timedelta(days=1)
|
45 |
next_day = next_day_date.strftime ('%d/%m/%Y')
|
46 |
+
# df = pd.DataFrame(data=preds[0], columns=[f"AQI Predictions for {next_day}"], dtype=int)
|
47 |
+
str1 = ""
|
48 |
+
# return int(preds[0])
|
49 |
+
|
50 |
+
|
51 |
+
for x in range(8):
|
52 |
+
if(x != 0):
|
53 |
+
str1 += (datetime.now() + timedelta(days=x)).strftime('%Y-%m-%d') + " predicted aqi: " + str(int(preds[len(preds) - 8 + x]))+"\n"
|
54 |
+
|
55 |
+
print(str1)
|
56 |
+
return str1
|
57 |
|
58 |
|
59 |
demo = gr.Interface(fn=greet, inputs="text", outputs="text")
|
60 |
+
|
61 |
+
|
62 |
|
63 |
if __name__ == "__main__":
|
64 |
demo.launch()
|