Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,18 +1,10 @@
|
|
1 |
import gradio as gr
|
2 |
from AinaTheme import AinaGradioTheme
|
3 |
from transformers import pipeline
|
4 |
-
|
5 |
-
# gr.load("projecte-aina/multiner_ceil",src="models",aggregation_strategy="first", **AinaGradioTheme().get_kwargs()).launch()
|
6 |
-
|
7 |
-
|
8 |
import gradio as gr
|
9 |
|
10 |
ner_pipeline = pipeline("token-classification", model="projecte-aina/multiner_ceil",aggregation_strategy="first")
|
11 |
|
12 |
-
# examples = [
|
13 |
-
# "Does Chicago have any stores and does Joe live here?",
|
14 |
-
# ]
|
15 |
-
|
16 |
def ner(text):
|
17 |
output = ner_pipeline(text)
|
18 |
return {"text": text, "entities": output}
|
|
|
1 |
import gradio as gr
|
2 |
from AinaTheme import AinaGradioTheme
|
3 |
from transformers import pipeline
|
|
|
|
|
|
|
|
|
4 |
import gradio as gr
|
5 |
|
6 |
ner_pipeline = pipeline("token-classification", model="projecte-aina/multiner_ceil",aggregation_strategy="first")
|
7 |
|
|
|
|
|
|
|
|
|
8 |
def ner(text):
|
9 |
output = ner_pipeline(text)
|
10 |
return {"text": text, "entities": output}
|