Emanuela Boros
commited on
Commit
•
080b152
1
Parent(s):
043264c
Add token for private repos
Browse files
app.py
CHANGED
@@ -1,7 +1,11 @@
|
|
1 |
import gradio as gr
|
2 |
from transformers import pipeline
|
|
|
3 |
|
4 |
-
|
|
|
|
|
|
|
5 |
|
6 |
|
7 |
def ner(input):
|
@@ -49,6 +53,11 @@ demo = gr.Interface(
|
|
49 |
"des sources officielles, ces mesures pourraient avoir des répercussions significatives sur le commerce "
|
50 |
"mondial, exacerbant les incertitudes économiques déjà présentes. Les discussions en cours visent à apaiser "
|
51 |
"les tensions, mais les perspectives restent incertaines.",
|
|
|
|
|
|
|
|
|
|
|
52 |
],
|
53 |
)
|
54 |
demo.launch()
|
|
|
1 |
import gradio as gr
|
2 |
from transformers import pipeline
|
3 |
+
import os
|
4 |
|
5 |
+
token = os.getenv("HF_TOKEN")
|
6 |
+
get_completion = pipeline(
|
7 |
+
"ner", model="impresso-project/bert-newsagency-ner-fr", use_auth_token=token
|
8 |
+
)
|
9 |
|
10 |
|
11 |
def ner(input):
|
|
|
53 |
"des sources officielles, ces mesures pourraient avoir des répercussions significatives sur le commerce "
|
54 |
"mondial, exacerbant les incertitudes économiques déjà présentes. Les discussions en cours visent à apaiser "
|
55 |
"les tensions, mais les perspectives restent incertaines.",
|
56 |
+
"British United Press - On the home front, the British populace remains steadfast in the face of ongoing air "
|
57 |
+
"raids. In London, despite the destruction, the spirit of the people is unbroken, with volunteers and civil "
|
58 |
+
"defense units working tirelessly to support the war effort. Reports from BUP correspondents highlight the "
|
59 |
+
"nationwide push for increased production in factories, essential for supplying the front lines with the "
|
60 |
+
"materials needed for victory.",
|
61 |
],
|
62 |
)
|
63 |
demo.launch()
|