Spaces:
Sleeping
Sleeping
renderer changed to iframe
Browse files
app.py
CHANGED
|
@@ -5,12 +5,15 @@ from collections import Counter
|
|
| 5 |
import pandas as pd
|
| 6 |
import plotly.express as px
|
| 7 |
import plotly.graph_objects as go
|
|
|
|
| 8 |
import streamlit as st
|
| 9 |
from safetensors import safe_open
|
| 10 |
from sentence_transformers import SentenceTransformer
|
| 11 |
|
| 12 |
from semantic_search import predict
|
| 13 |
|
|
|
|
|
|
|
| 14 |
HF_TOKEN = os.environ.get("HF_TOKEN")
|
| 15 |
CITIES_ENRICHED = os.path.join("data", "cities_enriched_manually.csv")
|
| 16 |
DATA = os.path.join("2025-06-13_musterdatenkatalog.json")
|
|
@@ -185,28 +188,9 @@ def load_data() -> pd.DataFrame:
|
|
| 185 |
return germany
|
| 186 |
|
| 187 |
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
germany = pd.DataFrame(
|
| 192 |
-
{
|
| 193 |
-
"ORG": [
|
| 194 |
-
"Berlin",
|
| 195 |
-
"Hamburg",
|
| 196 |
-
"München",
|
| 197 |
-
"Köln",
|
| 198 |
-
"Frankfurt am Main",
|
| 199 |
-
"Stuttgart",
|
| 200 |
-
"Düsseldorf",
|
| 201 |
-
"Leipzig",
|
| 202 |
-
"Dortmund",
|
| 203 |
-
"Essen",
|
| 204 |
-
],
|
| 205 |
-
"lat": [52.52, 53.55, 48.14, 50.94, 50.11, 48.78, 51.22, 51.34, 51.51, 51.45],
|
| 206 |
-
"lon": [13.41, 9.99, 11.58, 6.96, 8.68, 9.18, 6.77, 12.37, 7.46, 7.01],
|
| 207 |
-
"Count": [1000, 800, 600, 500, 400, 300, 200, 150, 100, 50],
|
| 208 |
-
}
|
| 209 |
-
)
|
| 210 |
|
| 211 |
|
| 212 |
fig_map = px.scatter_geo(
|
|
@@ -403,5 +387,5 @@ st.markdown(
|
|
| 403 |
""",
|
| 404 |
unsafe_allow_html=True,
|
| 405 |
)
|
| 406 |
-
|
| 407 |
st.plotly_chart(fig_map)
|
|
|
|
| 5 |
import pandas as pd
|
| 6 |
import plotly.express as px
|
| 7 |
import plotly.graph_objects as go
|
| 8 |
+
import plotly.io as pio
|
| 9 |
import streamlit as st
|
| 10 |
from safetensors import safe_open
|
| 11 |
from sentence_transformers import SentenceTransformer
|
| 12 |
|
| 13 |
from semantic_search import predict
|
| 14 |
|
| 15 |
+
pio.renderers.default = "iframe"
|
| 16 |
+
|
| 17 |
HF_TOKEN = os.environ.get("HF_TOKEN")
|
| 18 |
CITIES_ENRICHED = os.path.join("data", "cities_enriched_manually.csv")
|
| 19 |
DATA = os.path.join("2025-06-13_musterdatenkatalog.json")
|
|
|
|
| 188 |
return germany
|
| 189 |
|
| 190 |
|
| 191 |
+
germany = load_data()
|
| 192 |
+
germany["lat"] = pd.to_numeric(germany["lat"])
|
| 193 |
+
germany["lon"] = pd.to_numeric(germany["lon"])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 194 |
|
| 195 |
|
| 196 |
fig_map = px.scatter_geo(
|
|
|
|
| 387 |
""",
|
| 388 |
unsafe_allow_html=True,
|
| 389 |
)
|
| 390 |
+
st.write(pio.renderers)
|
| 391 |
st.plotly_chart(fig_map)
|