Tomiwajin commited on
Commit
3dac2d5
·
verified ·
1 Parent(s): df30b8a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -71,7 +71,7 @@ def classify_batch_emails(emails: List[str]) -> List[Dict[str, Any]]:
71
 
72
  try:
73
  # Clean and truncate texts
74
- cleaned_emails = [email.strip()[:5000] for email in emails]
75
 
76
  # Get batch predictions
77
  predictions = model.predict(cleaned_emails)
@@ -134,7 +134,7 @@ model_loaded = load_model()
134
  if not model_loaded:
135
  logger.warning("Model failed to load - using dummy responses")
136
  def classify_single_email(email_text: str):
137
- return {"label": "job", "score": 0.95, "success": True, "note": "Using dummy classifier"}
138
 
139
  # Create Gradio interface
140
  with gr.Blocks(title="Email Classifier", theme=gr.themes.Soft()) as demo:
 
71
 
72
  try:
73
  # Clean and truncate texts
74
+ cleaned_emails = [email.strip()[:1000] for email in emails]
75
 
76
  # Get batch predictions
77
  predictions = model.predict(cleaned_emails)
 
134
  if not model_loaded:
135
  logger.warning("Model failed to load - using dummy responses")
136
  def classify_single_email(email_text: str):
137
+ return {"label": "applied", "score": 0.95, "success": True, "note": "Using dummy classifier"}
138
 
139
  # Create Gradio interface
140
  with gr.Blocks(title="Email Classifier", theme=gr.themes.Soft()) as demo: