emanuelaboros commited on
Commit
7c9f65a
·
1 Parent(s): c88d6c1

update model

Browse files
Files changed (1) hide show
  1. app.py +4 -6
app.py CHANGED
@@ -6,12 +6,10 @@ import nltk
6
  # Check if the resource is available; if not, download it
7
  nltk.download("averaged_perceptron_tagger")
8
 
9
- # Your existing app code follows
10
-
11
  token = os.getenv("HF_TOKEN")
12
  get_completion = pipeline(
13
  "newsagency-ner",
14
- model="impresso-project/ner-newsagency-bert-fr",
15
  trust_remote_code=True,
16
  revision="main",
17
  token=token,
@@ -27,13 +25,13 @@ demo = gr.Interface(
27
  fn=ner,
28
  inputs=[
29
  gr.Textbox(
30
- label="Find the news agency mentions in the following text in French:",
31
  lines=2,
32
  )
33
  ],
34
  outputs=[gr.HighlightedText(label="Text with news agency mentions")],
35
- title="News Agency Recognition with impresso-project/bert-newsagency-ner-fr",
36
- description="Find entities using the `impresso-project/bert-newsagency-ner-fr` model under the hood!",
37
  allow_flagging="never",
38
  # Here we introduce a new tag, examples, easy to use examples for your application
39
  examples=[
 
6
  # Check if the resource is available; if not, download it
7
  nltk.download("averaged_perceptron_tagger")
8
 
 
 
9
  token = os.getenv("HF_TOKEN")
10
  get_completion = pipeline(
11
  "newsagency-ner",
12
+ model="impresso-project/ner-newsagency-bert-multilingual",
13
  trust_remote_code=True,
14
  revision="main",
15
  token=token,
 
25
  fn=ner,
26
  inputs=[
27
  gr.Textbox(
28
+ label="Find the news agency mentions in the following text:",
29
  lines=2,
30
  )
31
  ],
32
  outputs=[gr.HighlightedText(label="Text with news agency mentions")],
33
+ title="News Agency Recognition with impresso-project/ner-newsagency-bert-multilingual",
34
+ description="Find entities using the `impresso-project/ner-newsagency-bert-multilingual` model under the hood!",
35
  allow_flagging="never",
36
  # Here we introduce a new tag, examples, easy to use examples for your application
37
  examples=[