diff --git a/dbgpt_hub/predict/predict.py b/dbgpt_hub/predict/predict.py index e4653b7..6d67722 100644 --- a/dbgpt_hub/predict/predict.py +++ b/dbgpt_hub/predict/predict.py @@ -49,7 +49,10 @@ def main(): with open(predict_output_dir_name, "w") as f: for p in result: - f.write(p.replace("\n", " ") + "\n") + try: + f.write(p.replace("\n", " ") + "\n") + except: + f.write("Invalid Output!\n") if __name__ == "__main__":