ejschwartz commited on
Commit
6ce6744
·
1 Parent(s): fd92c93
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -72,7 +72,14 @@ def predict(code):
72
 
73
  output = pipe_out[0]["generated_text"]
74
 
75
- return output, output
 
 
 
 
 
 
 
76
 
77
 
78
  demo = gr.Interface(
 
72
 
73
  output = pipe_out[0]["generated_text"]
74
 
75
+ json_output = json.dumps("Failed")
76
+ try:
77
+ json.loads(output)
78
+ json_output = output
79
+ except Exception:
80
+ pass
81
+
82
+ return json_output, output
83
 
84
 
85
  demo = gr.Interface(