Spaces:
Runtime error
Runtime error
Ziyou Li
commited on
Commit
·
cd83371
1
Parent(s):
f90575b
Update app.py
Browse files
app.py
CHANGED
@@ -8,6 +8,7 @@ import json
|
|
8 |
import dateutil.parser as dp
|
9 |
import pandas as pd
|
10 |
from huggingface_hub import hf_hub_url, cached_download
|
|
|
11 |
|
12 |
def get_row():
|
13 |
response_tomtom = requests.get(
|
@@ -35,9 +36,10 @@ def get_row():
|
|
35 |
prec1h = json_response_smhi["timeSeries"][0]["parameters"][6]["values"][0] # Precipation last hour
|
36 |
fesn1h = json_response_smhi["timeSeries"][0]["parameters"][8]["values"][0] # Snow precipation last hour
|
37 |
vis = json_response_smhi["timeSeries"][0]["parameters"][9]["values"][0] # Visibility
|
|
|
|
|
38 |
|
39 |
-
|
40 |
-
row ={"referenceTime": referenceTime,
|
41 |
"t": t,
|
42 |
"ws": ws,
|
43 |
"prec1h": prec1h,
|
|
|
8 |
import dateutil.parser as dp
|
9 |
import pandas as pd
|
10 |
from huggingface_hub import hf_hub_url, cached_download
|
11 |
+
import time
|
12 |
|
13 |
def get_row():
|
14 |
response_tomtom = requests.get(
|
|
|
36 |
prec1h = json_response_smhi["timeSeries"][0]["parameters"][6]["values"][0] # Precipation last hour
|
37 |
fesn1h = json_response_smhi["timeSeries"][0]["parameters"][8]["values"][0] # Snow precipation last hour
|
38 |
vis = json_response_smhi["timeSeries"][0]["parameters"][9]["values"][0] # Visibility
|
39 |
+
|
40 |
+
time_now = time.time()
|
41 |
|
42 |
+
row ={"referenceTime": time_now,
|
|
|
43 |
"t": t,
|
44 |
"ws": ws,
|
45 |
"prec1h": prec1h,
|