Commit
·
ca007eb
1
Parent(s):
4c1c8f0
Making it stylistically similar to the other DS demo (#1)
Browse files- Making it stylistically similar to the other DS demo (209c7e7b2619a0152e33fbf4dc640dfc96fc630f)
Co-authored-by: Abubakar Abid <[email protected]>
app.py
CHANGED
@@ -67,12 +67,7 @@ unique_country = sorted(X_train["native.country"].unique())
|
|
67 |
|
68 |
with gr.Blocks() as demo:
|
69 |
gr.Markdown("""
|
70 |
-
|
71 |
-
|
72 |
-
This example shows how to load data from the hugging face hub to train an XGBoost classifier and
|
73 |
-
demo the predictions with gradio.
|
74 |
-
|
75 |
-
The source is [here](https://huggingface.co/spaces/gradio/xgboost-income-prediction-with-explainability).
|
76 |
""")
|
77 |
with gr.Row():
|
78 |
with gr.Column():
|
@@ -135,7 +130,7 @@ with gr.Blocks() as demo:
|
|
135 |
plot = gr.Plot()
|
136 |
with gr.Row():
|
137 |
predict_btn = gr.Button(value="Predict")
|
138 |
-
interpret_btn = gr.Button(value="
|
139 |
predict_btn.click(
|
140 |
predict,
|
141 |
inputs=[
|
|
|
67 |
|
68 |
with gr.Blocks() as demo:
|
69 |
gr.Markdown("""
|
70 |
+
**Income Classification with XGBoost 💰**: This demo uses an XGBoost classifier predicts income based on demographic factors, along with Shapley value-based *explanations*. The [source code for this Gradio demo is here](https://huggingface.co/spaces/gradio/xgboost-income-prediction-with-explainability).
|
|
|
|
|
|
|
|
|
|
|
71 |
""")
|
72 |
with gr.Row():
|
73 |
with gr.Column():
|
|
|
130 |
plot = gr.Plot()
|
131 |
with gr.Row():
|
132 |
predict_btn = gr.Button(value="Predict")
|
133 |
+
interpret_btn = gr.Button(value="Explain")
|
134 |
predict_btn.click(
|
135 |
predict,
|
136 |
inputs=[
|