Spaces:
Sleeping
Sleeping
Commit
·
0278910
1
Parent(s):
073b87a
Update app.py
Browse files
app.py
CHANGED
|
@@ -49,12 +49,9 @@ def get_frame_and_attribution(slider_value):
|
|
| 49 |
attribution = display_softmax(attributions[slider_value])
|
| 50 |
|
| 51 |
return frame, attribution
|
| 52 |
-
|
| 53 |
-
with gr.Blocks() as demo:
|
| 54 |
-
gr.Markdown("# Introspection in Deep Reinforcement Learning")
|
| 55 |
-
|
| 56 |
with gr.Tab(label="Attribute"):
|
| 57 |
-
env_spec = gr.
|
| 58 |
env = gr.Interface(title="Create the Environment", allow_flagging="never", inputs=env_spec, fn=create_training_loop, outputs=gr.JSON())
|
| 59 |
|
| 60 |
with gr.Row():
|
|
@@ -63,7 +60,6 @@ with gr.Blocks() as demo:
|
|
| 63 |
gr.Button("ATTRIBUTE").click(fn=generate_output, inputs=[baselines, option])
|
| 64 |
slider = gr.Slider(label="Key Frame", minimum=0, maximum=1000, step=1, value=0)
|
| 65 |
|
| 66 |
-
gr.Interface(fn=get_frame_and_attribution, inputs=slider, live=True, outputs=[gr.Image()
|
| 67 |
-
|
| 68 |
|
| 69 |
demo.launch()
|
|
|
|
| 49 |
attribution = display_softmax(attributions[slider_value])
|
| 50 |
|
| 51 |
return frame, attribution
|
| 52 |
+
|
|
|
|
|
|
|
|
|
|
| 53 |
with gr.Tab(label="Attribute"):
|
| 54 |
+
env_spec = gr.Dropdown(choices=["LunarLander-v2"],type="value",multiselect=False, label="Environment Specification (e.g.: LunarLander-v2)", lines=1)
|
| 55 |
env = gr.Interface(title="Create the Environment", allow_flagging="never", inputs=env_spec, fn=create_training_loop, outputs=gr.JSON())
|
| 56 |
|
| 57 |
with gr.Row():
|
|
|
|
| 60 |
gr.Button("ATTRIBUTE").click(fn=generate_output, inputs=[baselines, option])
|
| 61 |
slider = gr.Slider(label="Key Frame", minimum=0, maximum=1000, step=1, value=0)
|
| 62 |
|
| 63 |
+
gr.Interface(fn=get_frame_and_attribution, inputs=slider, live=True, outputs=[gr.Image(label="Timestep")])
|
|
|
|
| 64 |
|
| 65 |
demo.launch()
|