peter2000 commited on
Commit
85f22bf
β€’
1 Parent(s): c26d739

Update apps/sdg.py

Browse files
Files changed (1) hide show
  1. apps/sdg.py +2 -2
apps/sdg.py CHANGED
@@ -12,7 +12,7 @@ def app():
12
  model_name = 'sentence-transformers/all-MiniLM-L6-v2'
13
  model = SentenceTransformer(model_name)
14
 
15
- with st.spinner("πŸ‘‘ load sdg data"):
16
  df_osdg = pd.read_csv('https://zenodo.org/record/5550238/files/osdg-community-dataset-v21-09-30.csv',sep='\t')
17
  df_osdg = df_osdg[df_osdg['agreement']>.95]
18
  df_osdg = df_osdg[df_osdg['labels_positive']>4]
@@ -42,7 +42,7 @@ def app():
42
  docs = list(df_osdg['text'])
43
  docs_embeddings = model.encode(docs)
44
 
45
- with st.spinner("πŸ‘‘ prepare visualisation"):
46
  n_neighbors = 15
47
  n_components = 3
48
  random_state =42
 
12
  model_name = 'sentence-transformers/all-MiniLM-L6-v2'
13
  model = SentenceTransformer(model_name)
14
 
15
+ with st.spinner("πŸ‘‘ load and embed SDG texts"):
16
  df_osdg = pd.read_csv('https://zenodo.org/record/5550238/files/osdg-community-dataset-v21-09-30.csv',sep='\t')
17
  df_osdg = df_osdg[df_osdg['agreement']>.95]
18
  df_osdg = df_osdg[df_osdg['labels_positive']>4]
 
42
  docs = list(df_osdg['text'])
43
  docs_embeddings = model.encode(docs)
44
 
45
+ with st.spinner("πŸ‘‘ map to 3D for visualisation"):
46
  n_neighbors = 15
47
  n_components = 3
48
  random_state =42