iatechaways commited on
Commit
94bddb3
·
verified ·
1 Parent(s): fe42c82

Fix SyntaxError: Move email conversion code inside try block before return

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -85,13 +85,13 @@ def handle_email(email_text: str):
85
 
86
  print("[APP] Returning model_output successfully")
87
  print("="*50)
88
- sys.stdout.flush()
89
 
90
  # Convert JSON output to email format
91
  email_subject = model_output.get("email_subject", "No Subject")
92
  email_body = model_output.get("email_body", "No content generated")
93
  email_format = f"Subject: {email_subject}\n\n{email_body}"
94
  return email_format
 
95
 
96
  except Exception as e:
97
  error_msg = f"ERROR in handle_email: {str(e)}"
 
85
 
86
  print("[APP] Returning model_output successfully")
87
  print("="*50)
 
88
 
89
  # Convert JSON output to email format
90
  email_subject = model_output.get("email_subject", "No Subject")
91
  email_body = model_output.get("email_body", "No content generated")
92
  email_format = f"Subject: {email_subject}\n\n{email_body}"
93
  return email_format
94
+
95
 
96
  except Exception as e:
97
  error_msg = f"ERROR in handle_email: {str(e)}"