Rainsilves commited on
Commit
ee8a91d
1 Parent(s): bd550e0

more performance improvements

Browse files
Files changed (1) hide show
  1. interpretable_text_clustering.py +3 -3
interpretable_text_clustering.py CHANGED
@@ -40,7 +40,7 @@ task = form.radio("Which task are we solving?", ('Classification', 'Clustering')
40
  dataset_name = form.text_area("Enter the name of the huggingface Dataset to do analysis of:", value = "Hellisotherpeople/DebateSum")
41
  dataset_name_2 = form.text_area("Enter the name of the config for the dataset if it has one", value = "")
42
  split_name = form.text_area("Enter the name of the split of the dataset that you want to use", value = "train")
43
- number_of_records = form.number_input("Enter the number of documents that you want to analyze from the dataset", value = 200)
44
  column_name = form.text_area("Enter the name of the column that we are doing analysis on (the X value)", value = "Full-Document")
45
 
46
  if task == "Classification":
@@ -141,7 +141,7 @@ text_example = """Judge Leon last week questioned the effectiveness of the gover
141
  form_explainer = st.sidebar.form("explainer_form")
142
  form_explainer.header("Explainer Settings")
143
  position_dep = form_explainer.checkbox("Check this if you want to take into account the position of a word in the interpretation", value = False)
144
- number_samples = form_explainer.number_input("Enter the number of explainer peterbuted samples, higher creates a better explanation but takes longer", value = 5000)
145
  char_based = form_explainer.checkbox("Check this if you want to use a character based explanier", value = False)
146
  form_explainer.form_submit_button("Submit")
147
 
@@ -150,7 +150,7 @@ te = TextExplainer(random_state=42, char_based=char_based, n_samples = number_sa
150
 
151
  input_choice = st.checkbox("Check this if you want to enter your own example to explain", value = False)
152
  if input_choice == False:
153
- record_to_explain = st.number_input("Enter the index of the document from the original dataset to interpret", value = 151)
154
  te.fit(df[column_name][record_to_explain], text_clf.predict_proba)
155
  if task == "Classification":
156
  st.write("Ground truth label")
 
40
  dataset_name = form.text_area("Enter the name of the huggingface Dataset to do analysis of:", value = "Hellisotherpeople/DebateSum")
41
  dataset_name_2 = form.text_area("Enter the name of the config for the dataset if it has one", value = "")
42
  split_name = form.text_area("Enter the name of the split of the dataset that you want to use", value = "train")
43
+ number_of_records = form.number_input("Enter the number of documents that you want to analyze from the dataset", value = 50)
44
  column_name = form.text_area("Enter the name of the column that we are doing analysis on (the X value)", value = "Full-Document")
45
 
46
  if task == "Classification":
 
141
  form_explainer = st.sidebar.form("explainer_form")
142
  form_explainer.header("Explainer Settings")
143
  position_dep = form_explainer.checkbox("Check this if you want to take into account the position of a word in the interpretation", value = False)
144
+ number_samples = form_explainer.number_input("Enter the number of explainer peterbuted samples, higher creates a better explanation but takes longer", value = 1000)
145
  char_based = form_explainer.checkbox("Check this if you want to use a character based explanier", value = False)
146
  form_explainer.form_submit_button("Submit")
147
 
 
150
 
151
  input_choice = st.checkbox("Check this if you want to enter your own example to explain", value = False)
152
  if input_choice == False:
153
+ record_to_explain = st.number_input("Enter the index of the document from the original dataset to interpret", value = 30)
154
  te.fit(df[column_name][record_to_explain], text_clf.predict_proba)
155
  if task == "Classification":
156
  st.write("Ground truth label")