wanggenfu commited on
Commit
c924eee
·
verified ·
1 Parent(s): 2adf923

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -23
app.py CHANGED
@@ -234,28 +234,6 @@ spam_email = {
234
  "body": "CONGRATULATIONS! You have been selected as the winner of our international lottery! To claim your $5,000,000 prize, please send us your bank details and a processing fee of $100."
235
  }
236
 
237
- # # 处理合法电子邮件
238
- # print("\nProcessing legitimate email...")
239
- # legitimate_result = compiled_graph.invoke({
240
- # "email": legitimate_email,
241
- # "is_spam": None,
242
- # "spam_reason": None,
243
- # "email_category": None,
244
- # "draft_response": None,
245
- # "messages": []
246
- # })
247
-
248
- # 处理垃圾邮件
249
- # print("\nProcessing spam email...")
250
- # spam_result = compiled_graph.invoke({
251
- # "email": spam_email,
252
- # "is_spam": None,
253
- # "spam_reason": None,
254
- # "email_category": None,
255
- # "draft_response": None,
256
- # "messages": []
257
- # })
258
-
259
  def classify_email(email):
260
  result = compiled_graph.invoke({
261
  "email": email,
@@ -268,5 +246,5 @@ def classify_email(email):
268
  return f"is_spam:{result.get("is_spam")}\nspam_reason:{result.get("spam_reason")}"
269
 
270
 
271
- demo = gr.Interface(fn=greet, inputs="text", outputs="text")
272
  demo.launch()
 
234
  "body": "CONGRATULATIONS! You have been selected as the winner of our international lottery! To claim your $5,000,000 prize, please send us your bank details and a processing fee of $100."
235
  }
236
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
237
  def classify_email(email):
238
  result = compiled_graph.invoke({
239
  "email": email,
 
246
  return f"is_spam:{result.get("is_spam")}\nspam_reason:{result.get("spam_reason")}"
247
 
248
 
249
+ demo = gr.Interface(fn=classify_email, inputs="text", outputs="text")
250
  demo.launch()