PaulNdrei commited on
Commit
48eb165
·
1 Parent(s): c1792e8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -14,13 +14,13 @@ ner_pipeline = pipeline("token-classification", model="projecte-aina/multiner_ce
14
 
15
  def submit_input(text):
16
  if text.strip() == "":
17
- gr.Warning('Not possible to inference an empty input')
18
  return None
19
 
20
  model_output = ner_pipeline(text)
21
 
22
  if model_output is None:
23
- gr.Warning('Inference endpoint is not available right now. Please try again later.')
24
 
25
  return {"text": text, "entities": model_output}
26
 
 
14
 
15
  def submit_input(text):
16
  if text.strip() == "":
17
+ gr.Warning('Not possible to process an empty input')
18
  return None
19
 
20
  model_output = ner_pipeline(text)
21
 
22
  if model_output is None:
23
+ gr.Warning('An error occurred. Please try again later.')
24
 
25
  return {"text": text, "entities": model_output}
26