Spaces:
Build error
Build error
New description with article
Browse files
app.py
CHANGED
|
@@ -152,7 +152,20 @@ def trainme(MedInc, AveOccup, HouseAge, Latitude, Longitude, Price):
|
|
| 152 |
|
| 153 |
return final_list
|
| 154 |
|
| 155 |
-
#Define gradio UI
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 156 |
|
| 157 |
input = [gr.inputs.Slider(0.5, 15, default=4.406300, label='Median income'),
|
| 158 |
gr.inputs.Slider(1, 30, default=2.446602, label='Average number of household members'),
|
|
@@ -170,6 +183,7 @@ output = [gr.outputs.Textbox(label='Prediction'),
|
|
| 170 |
iface = gr.Interface(fn=trainme,
|
| 171 |
inputs=input,
|
| 172 |
outputs=output,
|
| 173 |
-
title =
|
| 174 |
-
description=
|
|
|
|
| 175 |
iface.launch()
|
|
|
|
| 152 |
|
| 153 |
return final_list
|
| 154 |
|
| 155 |
+
#Define gradio UI
|
| 156 |
+
|
| 157 |
+
|
| 158 |
+
title = '🔮 Explain me like I\'m 5'
|
| 159 |
+
|
| 160 |
+
description = """
|
| 161 |
+
<center>
|
| 162 |
+
Gradio Demo for model interpretation powered by LIME.\n
|
| 163 |
+
To use it, simply choose your values, and hit 'Submit'. It will train a vanilla Random Forest Regressor, interpret it using Lime and generating an explanation in plain English using a fill-in-the-blank template.
|
| 164 |
+
</center>
|
| 165 |
+
"""
|
| 166 |
+
|
| 167 |
+
article = "Originally made by [Ulysse Bottello](https://github.com/ulyssebottello), using [California Housing Dataset](https://scikit-learn.org/stable/datasets/real_world.html#california-housing-dataset) and [Lime](https://github.com/marcotcr/lime)"
|
| 168 |
+
|
| 169 |
|
| 170 |
input = [gr.inputs.Slider(0.5, 15, default=4.406300, label='Median income'),
|
| 171 |
gr.inputs.Slider(1, 30, default=2.446602, label='Average number of household members'),
|
|
|
|
| 183 |
iface = gr.Interface(fn=trainme,
|
| 184 |
inputs=input,
|
| 185 |
outputs=output,
|
| 186 |
+
title = title,
|
| 187 |
+
description= description,
|
| 188 |
+
article = article)
|
| 189 |
iface.launch()
|