xd11yggy commited on
Commit
0a827ad
·
verified ·
1 Parent(s): d49345d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -45,8 +45,8 @@ class CodeExecutor:
45
  output_text = output.read()
46
  error_text = error.read()
47
  if error_text:
48
- return f"{code}\n\nTraceback (most recent call last):\n{error_text}"
49
- return f"{code}\n\nOutput:\n{output_text}"
50
 
51
  def execute(self, code, inputs, packages):
52
  try:
 
45
  output_text = output.read()
46
  error_text = error.read()
47
  if error_text:
48
+ return f"User Code:\n{code}\n\nError:\n{error_text}"
49
+ return f"User Code:\n{code}\n\nOutput:\n{output_text}"
50
 
51
  def execute(self, code, inputs, packages):
52
  try: