Update descriptions and add default value
Browse files
app.py
CHANGED
@@ -110,11 +110,15 @@ def stacked_model(model1,model2,model3):
|
|
110 |
title = "Combine predictors using stacking"
|
111 |
with gr.Blocks(title=title) as demo:
|
112 |
gr.Markdown(f"## {title}")
|
113 |
-
gr.Markdown("
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
|
|
|
|
|
|
|
|
118 |
plot = gr.Plot()
|
119 |
stack_btn = gr.Button("Stack")
|
120 |
stack_btn.click(fn=stacked_model, inputs=[model1,model2,model3], outputs=[plot])
|
|
|
110 |
title = "Combine predictors using stacking"
|
111 |
with gr.Blocks(title=title) as demo:
|
112 |
gr.Markdown(f"## {title}")
|
113 |
+
gr.Markdown("""
|
114 |
+
This app demonstrates combining 3 predictors trained on Ames housing dataset from OpenML using stacking and Ridge estimator as final estimator.
|
115 |
+
Stacking uses a meta-learning algorithm to learn how to best combine the predictions from trained models. The OpenML Ames housing dataset is a processed version of the 'Ames Iowa Housing'with 81 features.
|
116 |
+
This app is developed based on [scikit-learn example](https://scikit-learn.org/stable/auto_examples/ensemble/plot_stack_predictors.html#sphx-glr-auto-examples-ensemble-plot-stack-predictors-py)
|
117 |
+
""")
|
118 |
+
|
119 |
+
model1 = gr.Textbox(label="Repo id of first model", value="https://huggingface.co/haizad/ames-housing-random-forest-predictor")
|
120 |
+
model2 = gr.Textbox(label="Repo id of second model", value="https://huggingface.co/haizad/ames-housing-gbdt-predictor")
|
121 |
+
model3 = gr.Textbox(label="Repo id of third model", value="https://huggingface.co/haizad/ames-housing-lasso-predictor")
|
122 |
plot = gr.Plot()
|
123 |
stack_btn = gr.Button("Stack")
|
124 |
stack_btn.click(fn=stacked_model, inputs=[model1,model2,model3], outputs=[plot])
|