Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -15,7 +15,7 @@ st.set_page_config(page_title="Sinhala Embedding Space", page_icon=":bar_chart:"
|
|
15 |
image = Image.open('plots/clusters.png')
|
16 |
|
17 |
# Load data
|
18 |
-
@st.cache_data
|
19 |
def load_data():
|
20 |
chart_data = pd.read_csv(r"data/top_cluster_dataset.csv",dtype={'Headline': str, 'x': np.float64, 'y': np.float64, 'labels': str})
|
21 |
return chart_data
|
@@ -27,7 +27,6 @@ chart_data = load_data()
|
|
27 |
tabs = ["Clustering Results","Sentences Similarity"]
|
28 |
selected_tab = st.sidebar.radio("Select a Tab", tabs)
|
29 |
|
30 |
-
@st.cache_data(persist='disk')
|
31 |
def get_altair_chart():
|
32 |
chart = alt.Chart(chart_data).mark_circle(size=60).encode(x='x', y='y', color='labels', tooltip=['Headline']).interactive()
|
33 |
return chart
|
|
|
15 |
image = Image.open('plots/clusters.png')
|
16 |
|
17 |
# Load data
|
18 |
+
@st.cache_data
|
19 |
def load_data():
|
20 |
chart_data = pd.read_csv(r"data/top_cluster_dataset.csv",dtype={'Headline': str, 'x': np.float64, 'y': np.float64, 'labels': str})
|
21 |
return chart_data
|
|
|
27 |
tabs = ["Clustering Results","Sentences Similarity"]
|
28 |
selected_tab = st.sidebar.radio("Select a Tab", tabs)
|
29 |
|
|
|
30 |
def get_altair_chart():
|
31 |
chart = alt.Chart(chart_data).mark_circle(size=60).encode(x='x', y='y', color='labels', tooltip=['Headline']).interactive()
|
32 |
return chart
|