ulysse commited on
Commit
50f6e8c
·
1 Parent(s): 2a52596

New description with article

Browse files
Files changed (1) hide show
  1. app.py +17 -3
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 MedInc, AveOccup, HouseAge, Latitude, Longitude, Price):
 
 
 
 
 
 
 
 
 
 
 
 
 
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 = '🔮 Explain me like I\'m 5',
174
- description="Gradio Demo for model interpretation powered by LIME.\nTo use it, simply choose your values, and hit 'Submit'. It will train a vanilla Random Forest Regressor on the California Housing datatset, interpret it using lime and generating an explanation in plain English using a fill-in-the-blank template.")
 
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()