lhoestq HF staff commited on
Commit
63b68a5
1 Parent(s): 79ad082

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -154,11 +154,11 @@ demo = gr.Interface(
154
 
155
  app = FastAPI()
156
 
157
- @app.head("/predict")
158
  def predict_head():
159
  return StreamingResponse("", media_type="application/json")
160
 
161
- @app.get("/predict")
162
  def predict_get(text: str = "", labels: str = "", threshold: float = 0.3, nested_ner: bool = False):
163
  predict_response = requests.post('http://localhost:7860/call/predict', json={'data': [text, labels, threshold, nested_ner]}).json()
164
  if "event_id" not in predict_response:
 
154
 
155
  app = FastAPI()
156
 
157
+ @app.head("/ner")
158
  def predict_head():
159
  return StreamingResponse("", media_type="application/json")
160
 
161
+ @app.get("/ner")
162
  def predict_get(text: str = "", labels: str = "", threshold: float = 0.3, nested_ner: bool = False):
163
  predict_response = requests.post('http://localhost:7860/call/predict', json={'data': [text, labels, threshold, nested_ner]}).json()
164
  if "event_id" not in predict_response: