Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -15,12 +15,13 @@ def load_data_predictions(github_token):
|
|
15 |
response = requests.get(url, headers=headers)
|
16 |
|
17 |
if response.status_code == 200:
|
18 |
-
|
19 |
file_content = response.json()['content']
|
20 |
-
|
|
|
21 |
|
22 |
df = pd.read_csv(csv_content, encoding='utf-8')
|
23 |
-
|
24 |
df = df.rename(columns={
|
25 |
'Price': 'Real Price',
|
26 |
'DNN1': 'Neural Network 1',
|
|
|
15 |
response = requests.get(url, headers=headers)
|
16 |
|
17 |
if response.status_code == 200:
|
18 |
+
|
19 |
file_content = response.json()['content']
|
20 |
+
decoded_content = base64.b64decode(file_content).decode('utf-8')
|
21 |
+
csv_content = StringIO(decoded_content)
|
22 |
|
23 |
df = pd.read_csv(csv_content, encoding='utf-8')
|
24 |
+
|
25 |
df = df.rename(columns={
|
26 |
'Price': 'Real Price',
|
27 |
'DNN1': 'Neural Network 1',
|