Spaces:
Sleeping
Sleeping
Commit
·
cecdb11
1
Parent(s):
bc8a52d
Update app.py
Browse files
app.py
CHANGED
|
@@ -91,8 +91,8 @@ else:
|
|
| 91 |
model_name = form.text_area("Enter the name of the pre-trained model from transformers that we are using for Question Answering", value = "deepset/roberta-base-squad2")
|
| 92 |
|
| 93 |
form.header("Model Explanation Display Settings")
|
| 94 |
-
output_width = form.number_input("Enter the number of pixels for width of model explanation html display", value =
|
| 95 |
-
output_height = form.number_input("Enter the number of pixels for height of model explanation html display", value =
|
| 96 |
form.form_submit_button("Submit")
|
| 97 |
|
| 98 |
@st.cache
|
|
@@ -157,5 +157,5 @@ else:
|
|
| 157 |
|
| 158 |
the_plot = shap.plots.text(shap_values, display = False)
|
| 159 |
st.caption("Scroll to see the full output!")
|
| 160 |
-
components.html(the_plot, height =
|
| 161 |
|
|
|
|
| 91 |
model_name = form.text_area("Enter the name of the pre-trained model from transformers that we are using for Question Answering", value = "deepset/roberta-base-squad2")
|
| 92 |
|
| 93 |
form.header("Model Explanation Display Settings")
|
| 94 |
+
output_width = form.number_input("Enter the number of pixels for width of model explanation html display", value = 500)
|
| 95 |
+
output_height = form.number_input("Enter the number of pixels for height of model explanation html display", value = 1000)
|
| 96 |
form.form_submit_button("Submit")
|
| 97 |
|
| 98 |
@st.cache
|
|
|
|
| 157 |
|
| 158 |
the_plot = shap.plots.text(shap_values, display = False)
|
| 159 |
st.caption("Scroll to see the full output!")
|
| 160 |
+
components.html(the_plot, height = output_height, width = output_width, scrolling = True)
|
| 161 |
|