akhaliq HF Staff commited on
Commit
87656ae
·
1 Parent(s): 07d284c

fix: update api decorator parameter to use named argument for predict endpoint

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -13,7 +13,7 @@ classifier = pipeline(
13
  )
14
  print("Model loaded successfully.")
15
 
16
- @app.api("/predict")
17
  @spaces.GPU
18
  def predict(text: str):
19
  """Detect PII in the given text and return aggregated spans."""
 
13
  )
14
  print("Model loaded successfully.")
15
 
16
+ @app.api(name="predict")
17
  @spaces.GPU
18
  def predict(text: str):
19
  """Detect PII in the given text and return aggregated spans."""