Spaces:
Sleeping
Sleeping
snowkylin
commited on
Commit
·
2a32b33
1
Parent(s):
20b5bfb
update description
Browse files
app.py
CHANGED
|
@@ -48,18 +48,19 @@ def predict(input_text, mcts_playouts):
|
|
| 48 |
|
| 49 |
gradio_app = gr.Interface(
|
| 50 |
predict,
|
| 51 |
-
inputs=[gr.Code(value=aiger_str, label="Input
|
| 52 |
gr.Slider(minimum=0, maximum=8, value=0, step=1, label="Monte-Carlo tree search steps")],
|
| 53 |
-
outputs=[gr.Code(label="
|
| 54 |
-
gr.BarPlot(label="Circuit
|
| 55 |
-
gr.Image(label="Original And-Inverter Graph"),
|
| 56 |
-
gr.Image(label="Optimized And-Inverter Graph"),
|
| 57 |
gr.Text(label="Truth table of the original circuit"),
|
| 58 |
gr.Text(label="Truth table of the optimized circuit"),
|
| 59 |
gr.Text(label="Equivalence"),],
|
| 60 |
-
title="Circuit Transformer for Size Minimization",
|
| 61 |
description="""This is a demo to show how a [Circuit Transformer](https://openreview.net/forum?id=kpnW12Lm9p)
|
| 62 |
-
minimize the size of a logic circuit by next token prediction, while strictly preserving logical equivalence.
|
|
|
|
| 63 |
)
|
| 64 |
|
| 65 |
if __name__ == "__main__":
|
|
|
|
| 48 |
|
| 49 |
gradio_app = gr.Interface(
|
| 50 |
predict,
|
| 51 |
+
inputs=[gr.Code(value=aiger_str, label="Input logic circuit (in Aiger format, #(inputs) <= 8, #(outputs) <= 2)"),
|
| 52 |
gr.Slider(minimum=0, maximum=8, value=0, step=1, label="Monte-Carlo tree search steps")],
|
| 53 |
+
outputs=[gr.Code(label="Output logic circuit (size-optimized, in Aiger format)"),
|
| 54 |
+
gr.BarPlot(label="Circuit size comparison", x="circuit", y="size", sort="-x"),
|
| 55 |
+
gr.Image(label="Original logic circuit (And-Inverter Graph)"),
|
| 56 |
+
gr.Image(label="Optimized logic circuit (And-Inverter Graph)"),
|
| 57 |
gr.Text(label="Truth table of the original circuit"),
|
| 58 |
gr.Text(label="Truth table of the optimized circuit"),
|
| 59 |
gr.Text(label="Equivalence"),],
|
| 60 |
+
title="Circuit Transformer for Size Minimization of Logic Circuits",
|
| 61 |
description="""This is a demo to show how a [Circuit Transformer](https://openreview.net/forum?id=kpnW12Lm9p)
|
| 62 |
+
minimize the size of a logic circuit by next token prediction, while strictly preserving logical equivalence.
|
| 63 |
+
[[GitHub Repo]](https://github.com/snowkylin/circuit-transformer)"""
|
| 64 |
)
|
| 65 |
|
| 66 |
if __name__ == "__main__":
|