wanggenfu commited on
Commit
a68f13c
verified
1 Parent(s): c924eee

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -1,5 +1,6 @@
1
  import gradio as gr
2
  import os
 
3
  from typing import TypedDict, List, Dict, Any, Optional
4
  from langgraph.graph import StateGraph, START, END
5
  # from langchain_openai import ChatOpenAI
@@ -234,7 +235,8 @@ 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
- def classify_email(email):
 
238
  result = compiled_graph.invoke({
239
  "email": email,
240
  "is_spam": None,
 
1
  import gradio as gr
2
  import os
3
+ import json
4
  from typing import TypedDict, List, Dict, Any, Optional
5
  from langgraph.graph import StateGraph, START, END
6
  # from langchain_openai import ChatOpenAI
 
235
  "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."
236
  }
237
 
238
+ def classify_email(json_input):
239
+ email = json.loads(json_input)
240
  result = compiled_graph.invoke({
241
  "email": email,
242
  "is_spam": None,