Commit
·
41e9ae6
1
Parent(s):
e98177c
Test
Browse files
main.py
CHANGED
|
@@ -42,7 +42,7 @@ def compile(source):
|
|
| 42 |
return compiled_bytes
|
| 43 |
|
| 44 |
|
| 45 |
-
def predict(source):
|
| 46 |
bytes = compile(source)
|
| 47 |
return bytes, 1.0
|
| 48 |
|
|
@@ -51,7 +51,10 @@ def run():
|
|
| 51 |
demo = gr.Interface(
|
| 52 |
fn=predict,
|
| 53 |
description=description,
|
| 54 |
-
inputs=
|
|
|
|
|
|
|
|
|
|
| 55 |
outputs=[gr.Textbox(), gr.Number()],
|
| 56 |
)
|
| 57 |
|
|
|
|
| 42 |
return compiled_bytes
|
| 43 |
|
| 44 |
|
| 45 |
+
def predict(target, source):
|
| 46 |
bytes = compile(source)
|
| 47 |
return bytes, 1.0
|
| 48 |
|
|
|
|
| 51 |
demo = gr.Interface(
|
| 52 |
fn=predict,
|
| 53 |
description=description,
|
| 54 |
+
inputs=[
|
| 55 |
+
gr.Textbox(lines=10, label="Python bytestring of binary code"),
|
| 56 |
+
gr.Textbox(lines=10, label="Decompiled C Source Code"),
|
| 57 |
+
],
|
| 58 |
outputs=[gr.Textbox(), gr.Number()],
|
| 59 |
)
|
| 60 |
|