Spaces:
Sleeping
Sleeping
Delete data_loader.py
Browse files- data_loader.py +0 -24
data_loader.py
DELETED
@@ -1,24 +0,0 @@
|
|
1 |
-
#Aqui añadiremos la conexion entre Supabase y Huggingface
|
2 |
-
|
3 |
-
import pandas as pd
|
4 |
-
from supabase import create_client, Client
|
5 |
-
|
6 |
-
#Aqui van las credenciales, conectar las credenciales de Supabase en "Secrets"
|
7 |
-
|
8 |
-
Class DataLoader():
|
9 |
-
|
10 |
-
#SUPABASE_URL =
|
11 |
-
#SUPABASE_KEY =
|
12 |
-
|
13 |
-
def load_data():
|
14 |
-
"""fertility, geo data, labor, population y predictions """
|
15 |
-
try:
|
16 |
-
response = supabase.from_("LabourForecast").execute()
|
17 |
-
if response.error:
|
18 |
-
st.error(f"Error fetching data: {response.error}")
|
19 |
-
return pd.DataFrame()
|
20 |
-
else:
|
21 |
-
return pd.DataFrame(response.data)
|
22 |
-
except Exception as e:
|
23 |
-
st.error(f"An error occurred: {e}")
|
24 |
-
return pd.DataFrame()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|