jerome-white commited on
Commit
9aa1c9e
1 Parent(s): 5aea366

Move documentation to dedicated directory

Browse files
app.py CHANGED
@@ -171,23 +171,17 @@ def cplot(df, ci=0.95):
171
 
172
  return _plot
173
 
174
- def md_reader(name, prefix='_'):
175
- path = Path(f'{prefix}{name.upper()}')
176
- return (path
177
- .with_suffix('.md')
178
- .read_text())
179
-
180
-
181
  #
182
  #
183
  #
184
  with gr.Blocks() as demo:
185
  df = load('jerome-white/alpaca-bt-stan')
 
186
 
187
  gr.Markdown('# Alpaca Bradley–Terry')
188
  with gr.Row():
189
  with gr.Column():
190
- gr.Markdown(md_reader('readme'))
191
 
192
  with gr.Column():
193
  plotter = RankPlotter(df)
@@ -230,6 +224,6 @@ with gr.Blocks() as demo:
230
  button.click(cplot(df), inputs=inputs, outputs=[display])
231
 
232
  with gr.Accordion('Disclaimer', open=False):
233
- gr.Markdown(md_reader('disclaimer'))
234
 
235
  demo.launch()
 
171
 
172
  return _plot
173
 
 
 
 
 
 
 
 
174
  #
175
  #
176
  #
177
  with gr.Blocks() as demo:
178
  df = load('jerome-white/alpaca-bt-stan')
179
+ docs = Path('docs', ' ').with_suffix('.md')
180
 
181
  gr.Markdown('# Alpaca Bradley–Terry')
182
  with gr.Row():
183
  with gr.Column():
184
+ gr.Markdown(docs.with_name('readme').read_text())
185
 
186
  with gr.Column():
187
  plotter = RankPlotter(df)
 
224
  button.click(cplot(df), inputs=inputs, outputs=[display])
225
 
226
  with gr.Accordion('Disclaimer', open=False):
227
+ gr.Markdown(docs.with_name('disclaimer').read_text())
228
 
229
  demo.launch()
_DISCLAIMER.md → docs/disclaimer.md RENAMED
File without changes
_README.md → docs/readme.md RENAMED
File without changes