haizad commited on
Commit
87f945c
·
1 Parent(s): e599435

fix repo id error

Browse files
Files changed (1) hide show
  1. app.py +7 -6
app.py CHANGED
@@ -102,7 +102,7 @@ def stacked_model(model1,model2,model3):
102
  ax.plot([], [], " ", label=f"{name}: {score}")
103
  ax.legend(loc="upper left")
104
 
105
- fig.suptitle("Single predictors versus stacked predictors")
106
  fig.tight_layout()
107
  fig.subplots_adjust(top=0.9)
108
  return fig
@@ -112,14 +112,15 @@ 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])
125
 
 
102
  ax.plot([], [], " ", label=f"{name}: {score}")
103
  ax.legend(loc="upper left")
104
 
105
+ fig.suptitle("Single predictor versus stacked predictors")
106
  fig.tight_layout()
107
  fig.subplots_adjust(top=0.9)
108
  return fig
 
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 combine the predictions from trained models.
116
+ The OpenML Ames housing dataset is a processed version of the 'Ames Iowa Housing' with 81 features.
117
  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)
118
  """)
119
 
120
+ model1 = gr.Textbox(label="Repo id of first model", value="haizad/ames-housing-random-forest-predictor")
121
+ model2 = gr.Textbox(label="Repo id of second model", value="haizad/ames-housing-gbdt-predictor")
122
+ model3 = gr.Textbox(label="Repo id of third model", value="haizad/ames-housing-lasso-predictor")
123
+ plot = gr.Plot("Comparison of single predictor against stacked predictor")
124
  stack_btn = gr.Button("Stack")
125
  stack_btn.click(fn=stacked_model, inputs=[model1,model2,model3], outputs=[plot])
126