Hellisotherpeople commited on
Commit
583b0ea
1 Parent(s): 9848e77

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -163,7 +163,7 @@ input_choice = st.checkbox("Check this if you want to enter your own example to
163
  if input_choice == False:
164
  record_to_explain = st.number_input("Enter the index of the document from the original dataset to interpret", value = 30)
165
  #te.fit(df[column_name][record_to_explain], text_clf.predict_proba)
166
- fit_text_explainer(df[column_name][record_to_explain], text_clf.predict_proba)
167
  if task == "Classification":
168
  st.write("Ground truth label")
169
  st.write(df[labels_column_name][record_to_explain])
@@ -179,7 +179,7 @@ if input_choice == False:
179
  else:
180
  record_to_explain = st.text_area("Enter the example document to explain", value = text_example)
181
  #te.fit(record_to_explain, text_clf.predict_proba)
182
- fit_text_explainer(record_to_explain, text_clf.predict_proba)
183
  if task == "Classification":
184
  st.write("Model prediction")
185
  model_prediction = text_clf.predict([record_to_explain])
 
163
  if input_choice == False:
164
  record_to_explain = st.number_input("Enter the index of the document from the original dataset to interpret", value = 30)
165
  #te.fit(df[column_name][record_to_explain], text_clf.predict_proba)
166
+ te = fit_text_explainer(df[column_name][record_to_explain], text_clf.predict_proba)
167
  if task == "Classification":
168
  st.write("Ground truth label")
169
  st.write(df[labels_column_name][record_to_explain])
 
179
  else:
180
  record_to_explain = st.text_area("Enter the example document to explain", value = text_example)
181
  #te.fit(record_to_explain, text_clf.predict_proba)
182
+ te = fit_text_explainer(record_to_explain, text_clf.predict_proba)
183
  if task == "Classification":
184
  st.write("Model prediction")
185
  model_prediction = text_clf.predict([record_to_explain])