bjorn-hommel commited on
Commit
03ba298
·
1 Parent(s): 49f754c
Files changed (4) hide show
  1. app.py +4 -2
  2. modeling.py +1 -3
  3. requirements.txt +1 -1
  4. sample_input.yaml +17 -12
app.py CHANGED
@@ -1,3 +1,4 @@
 
1
  import time
2
  import random
3
  import logging
@@ -110,8 +111,9 @@ def show_demo(placeholder):
110
  'timestap': datetime.now().strftime('%Y-%m-%d %H:%M:%S'),
111
  'input_data': utils.serialize_data(yaml_dict)
112
  }
113
-
114
- db.write_to_db(st.session_state.db, payload)
 
115
 
116
  tab1, tab2, tab3 = st.tabs(["Item Correlations", "Scale Correlations", "Scale Reliabilities"])
117
 
 
1
+ import os
2
  import time
3
  import random
4
  import logging
 
111
  'timestap': datetime.now().strftime('%Y-%m-%d %H:%M:%S'),
112
  'input_data': utils.serialize_data(yaml_dict)
113
  }
114
+ if os.environ.get('remote_model_path'):
115
+ # not logging locally
116
+ db.write_to_db(st.session_state.db, payload)
117
 
118
  tab1, tab2, tab3 = st.tabs(["Item Correlations", "Scale Correlations", "Scale Reliabilities"])
119
 
modeling.py CHANGED
@@ -9,8 +9,6 @@ from sentence_transformers import SentenceTransformer, util
9
 
10
  import utils
11
 
12
- SYNTHETIC_CONST = -0.00599
13
-
14
  def load_model():
15
 
16
  if st.session_state.get('model') is None:
@@ -56,7 +54,7 @@ def get_sign(df):
56
  .iloc[1:,:]
57
  .corr()
58
  .iloc[:,0]
59
- .apply(lambda x: np.sign(x + SYNTHETIC_CONST))
60
  )
61
  return(sign)
62
 
 
9
 
10
  import utils
11
 
 
 
12
  def load_model():
13
 
14
  if st.session_state.get('model') is None:
 
54
  .iloc[1:,:]
55
  .corr()
56
  .iloc[:,0]
57
+ .apply(lambda x: np.sign(x))
58
  )
59
  return(sign)
60
 
requirements.txt CHANGED
@@ -6,5 +6,5 @@ sentencepiece==0.1.99
6
  altair==4.2.2
7
  pingouin==0.5.4
8
  cleantext==1.1.4
9
- ftfy==1.1.4
10
  python-dotenv
 
6
  altair==4.2.2
7
  pingouin==0.5.4
8
  cleantext==1.1.4
9
+ ftfy==6.1.1
10
  python-dotenv
sample_input.yaml CHANGED
@@ -1,12 +1,17 @@
1
- Buttox-Fixation:
2
- - I like big butts.
3
- - But that butt you got makes me so horny.
4
- - Baby got back.
5
- - Shake that healthy butt.
6
- - My anaconda don´t want want none, unless you got buns, hun.
7
- - So ladies if tha butt is round
8
- - But please don´ lose that butt
9
- Delinquent behavior:
10
- - I cannot lie.
11
- - I am hooked an´ I cannot stop starin´
12
- - I am actin´ like an animal.
 
 
 
 
 
 
1
+ Dairy Product Phobia:
2
+ - I can easily eat dairy products without feeling nervous.
3
+ - I avoid places where dairy products are prominent, like ice cream shops.
4
+ - The sight of milk or cheese makes me uncomfortable.
5
+ - The thought of touching dairy products scares me.
6
+ Velociraptor Awareness:
7
+ - I can identify different types of dinosaurs from a distance.
8
+ - I am usually aware of any raptors in my surroundings.
9
+ - I prefer to live in a neighborhood with a low density of velociraptors.
10
+ - The idea of velociraptors roaming free does not concern me.
11
+ - I have never noticed any prehistoric creatures around me.
12
+ Reptile Sensitivity:
13
+ - I often look out for signs of reptiles in my local area.
14
+ - I prefer parks and outdoor areas that are known to be free of reptiles.
15
+ - I avoid visiting places where I know there are likely to be reptiles.
16
+ - The presence of reptiles in public spaces does not bother me.
17
+ - I have never been worried about encountering reptiles in my daily life.