Spaces:
Running
Running
Edward J. Schwartz commited on
Commit ·
ef58d40
1
Parent(s): fb223ca
Show each run as its own output box instead of tabs
Browse files
app.py
CHANGED
|
@@ -49,7 +49,7 @@ with gr.Blocks(title="cuobjdump / nvdisasm") as demo:
|
|
| 49 |
with gr.Column():
|
| 50 |
file = gr.File(label="cubin / fatbin / CUDA ELF", type="filepath")
|
| 51 |
tool = gr.Radio(list(TOOLS), value="cuobjdump", label="Tool")
|
| 52 |
-
flags = gr.CheckboxGroup(FLAGS["cuobjdump"], value=DEFAULT_FLAGS["cuobjdump"], label="Flags (each runs separately
|
| 53 |
extra = gr.Textbox(label="Extra arguments", placeholder="-fun vecadd")
|
| 54 |
btn = gr.Button("Run", variant="primary")
|
| 55 |
with gr.Column(scale=2):
|
|
@@ -57,10 +57,8 @@ with gr.Blocks(title="cuobjdump / nvdisasm") as demo:
|
|
| 57 |
|
| 58 |
@gr.render(inputs=results)
|
| 59 |
def show(results):
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
with gr.Tab(label):
|
| 63 |
-
gr.Code(output, label=label, lines=30, max_lines=60)
|
| 64 |
gr.Examples([[e, t] for e in EXAMPLES for t in TOOLS], [file, tool])
|
| 65 |
tool.change(lambda t: gr.CheckboxGroup(FLAGS[t], value=DEFAULT_FLAGS[t]), tool, flags)
|
| 66 |
btn.click(run, [file, tool, flags, extra], results)
|
|
|
|
| 49 |
with gr.Column():
|
| 50 |
file = gr.File(label="cubin / fatbin / CUDA ELF", type="filepath")
|
| 51 |
tool = gr.Radio(list(TOOLS), value="cuobjdump", label="Tool")
|
| 52 |
+
flags = gr.CheckboxGroup(FLAGS["cuobjdump"], value=DEFAULT_FLAGS["cuobjdump"], label="Flags (each runs separately with its own output)")
|
| 53 |
extra = gr.Textbox(label="Extra arguments", placeholder="-fun vecadd")
|
| 54 |
btn = gr.Button("Run", variant="primary")
|
| 55 |
with gr.Column(scale=2):
|
|
|
|
| 57 |
|
| 58 |
@gr.render(inputs=results)
|
| 59 |
def show(results):
|
| 60 |
+
for label, output in results.items():
|
| 61 |
+
gr.Code(output, label=label, max_lines=60)
|
|
|
|
|
|
|
| 62 |
gr.Examples([[e, t] for e in EXAMPLES for t in TOOLS], [file, tool])
|
| 63 |
tool.change(lambda t: gr.CheckboxGroup(FLAGS[t], value=DEFAULT_FLAGS[t]), tool, flags)
|
| 64 |
btn.click(run, [file, tool, flags, extra], results)
|