Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,6 +4,20 @@ import pandas as pd
|
|
| 4 |
import faiss
|
| 5 |
import numpy as np
|
| 6 |
from groq import Groq
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
|
| 8 |
# Import custom modules
|
| 9 |
from data_fetcher import get_hydrogen_data
|
|
@@ -34,3 +48,7 @@ if hydrogen_data is not None:
|
|
| 34 |
st.sidebar.write(hydrogen_data.head(5))
|
| 35 |
else:
|
| 36 |
st.sidebar.warning("⚠️ No hydrogen data available from NREL API.")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
import faiss
|
| 5 |
import numpy as np
|
| 6 |
from groq import Groq
|
| 7 |
+
from data_fetcher import fetch_nrel_data
|
| 8 |
+
|
| 9 |
+
# Fetch data from NREL API
|
| 10 |
+
data = fetch_nrel_data()
|
| 11 |
+
|
| 12 |
+
if data is None:
|
| 13 |
+
print("⚠️ Using backup dataset...")
|
| 14 |
+
data = [
|
| 15 |
+
{"station": "Example Station 1", "location": "California", "status": "Open"},
|
| 16 |
+
{"station": "Example Station 2", "location": "Texas", "status": "Planned"}
|
| 17 |
+
]
|
| 18 |
+
|
| 19 |
+
# Print the first station as a check
|
| 20 |
+
print("🚀 Hydrogen Station Data Sample:", data[0] if data else "No data available.")
|
| 21 |
|
| 22 |
# Import custom modules
|
| 23 |
from data_fetcher import get_hydrogen_data
|
|
|
|
| 48 |
st.sidebar.write(hydrogen_data.head(5))
|
| 49 |
else:
|
| 50 |
st.sidebar.warning("⚠️ No hydrogen data available from NREL API.")
|
| 51 |
+
|
| 52 |
+
|
| 53 |
+
|
| 54 |
+
|