Spaces:
Sleeping
Sleeping
Commit
·
237bdf9
1
Parent(s):
b01565f
Unified Markdown reader
Browse files
app.py
CHANGED
@@ -170,6 +170,13 @@ def cplot(df, ci=0.95):
|
|
170 |
|
171 |
return _plot
|
172 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
173 |
#
|
174 |
#
|
175 |
#
|
@@ -179,7 +186,7 @@ with gr.Blocks() as demo:
|
|
179 |
gr.Markdown('# Alpaca Bradley–Terry')
|
180 |
with gr.Row():
|
181 |
with gr.Column():
|
182 |
-
gr.Markdown(
|
183 |
|
184 |
with gr.Column():
|
185 |
plotter = RankPlotter(df)
|
@@ -222,6 +229,6 @@ with gr.Blocks() as demo:
|
|
222 |
button.click(cplot(df), inputs=inputs, outputs=[display])
|
223 |
|
224 |
with gr.Accordion('Disclaimer', open=False):
|
225 |
-
gr.Markdown(
|
226 |
|
227 |
demo.launch()
|
|
|
170 |
|
171 |
return _plot
|
172 |
|
173 |
+
def display(name, prefix='_'):
|
174 |
+
path = Path(f'{prefix}{name.upper()')
|
175 |
+
return (path
|
176 |
+
.with_suffix('.md')
|
177 |
+
.read_text())
|
178 |
+
|
179 |
+
|
180 |
#
|
181 |
#
|
182 |
#
|
|
|
186 |
gr.Markdown('# Alpaca Bradley–Terry')
|
187 |
with gr.Row():
|
188 |
with gr.Column():
|
189 |
+
gr.Markdown(display('readme'))
|
190 |
|
191 |
with gr.Column():
|
192 |
plotter = RankPlotter(df)
|
|
|
229 |
button.click(cplot(df), inputs=inputs, outputs=[display])
|
230 |
|
231 |
with gr.Accordion('Disclaimer', open=False):
|
232 |
+
gr.Markdown(display('disclaimer'))
|
233 |
|
234 |
demo.launch()
|