janasumit2911 commited on
Commit
9a5e1ff
·
verified ·
1 Parent(s): 702d6f6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -23,7 +23,7 @@ bert_model = TFBertForSequenceClassification.from_pretrained('BinaryModel_ep5')
23
  def predict_text(params):
24
  try:
25
  params = json.loads(params)
26
- except JSONDecodeError as e:
27
  return {"error": f"Invalid JSON input: {e.msg} at line {e.lineno} column {e.colno}"}
28
 
29
  texts = params.get("texts", [])
 
23
  def predict_text(params):
24
  try:
25
  params = json.loads(params)
26
+ except Exception as e:
27
  return {"error": f"Invalid JSON input: {e.msg} at line {e.lineno} column {e.colno}"}
28
 
29
  texts = params.get("texts", [])