Update app.py
Browse files
app.py
CHANGED
@@ -14,7 +14,7 @@ def exc(source, token):
|
|
14 |
else:
|
15 |
op = exec(source)
|
16 |
consoleop = sys.stdout.getvalue().strip()
|
17 |
-
return
|
18 |
except Exception as e:
|
19 |
return f"{e}"
|
20 |
sys.stdout = original_stdout
|
@@ -22,7 +22,7 @@ def exc(source, token):
|
|
22 |
app = gr.Interface(
|
23 |
fn=exc,
|
24 |
inputs=["text", "text"],
|
25 |
-
outputs=["text"],
|
26 |
)
|
27 |
|
28 |
app.launch()
|
|
|
14 |
else:
|
15 |
op = exec(source)
|
16 |
consoleop = sys.stdout.getvalue().strip()
|
17 |
+
return [op, consoleop]
|
18 |
except Exception as e:
|
19 |
return f"{e}"
|
20 |
sys.stdout = original_stdout
|
|
|
22 |
app = gr.Interface(
|
23 |
fn=exc,
|
24 |
inputs=["text", "text"],
|
25 |
+
outputs=["text", "text"],
|
26 |
)
|
27 |
|
28 |
app.launch()
|