mirror of
https://github.com/gradio-app/gradio.git
synced 2025-03-07 11:46:51 +08:00
fix error traceback
This commit is contained in:
parent
c0a146b717
commit
8e9fbbbdfa
@ -125,6 +125,9 @@ export class GradioInterface extends React.Component {
|
||||
this.props
|
||||
.fn(input_state, "predict", this.queueCallback)
|
||||
.then((output) => {
|
||||
if (output["error"] != null) {
|
||||
console.error("Error:", output["error"]);
|
||||
}
|
||||
if (!this.pending_response) {
|
||||
return;
|
||||
}
|
||||
|
@ -182,9 +182,9 @@ def predict():
|
||||
if app.interface.show_error:
|
||||
try:
|
||||
prediction, durations = app.interface.process(raw_input)
|
||||
except BaseException:
|
||||
except BaseException as error:
|
||||
traceback.print_exc()
|
||||
return jsonify({"error": traceback.format_exc()}), 500
|
||||
return jsonify({"error": str(error)}), 500
|
||||
else:
|
||||
prediction, durations = app.interface.process(raw_input)
|
||||
avg_durations = []
|
||||
|
Loading…
Reference in New Issue
Block a user