Spaces:
				
			
			
	
			
			
		Runtime error
		
	
	
	
			
			
	
	
	
	
		
		
		Runtime error
		
	| from transformers import pipeline | |
| import gradio as gr | |
| ner_pipeline = pipeline("ner", model="nickprock/bert-italian-finetuned-ner", aggregation_strategy=None) | |
| examples = [ | |
| ["Domani andrò allo stadio con Giovanna a vedere la Fiorentina"], | |
| ["La sede storica della Olivetti è ad Ivrea"], | |
| ["Ieri sera c'è stato Harry Potter in TV"] | |
| ] | |
| def ner(text): | |
| output = ner_pipeline(text) | |
| return {"text": text, "entities": output} | |
| demo = gr.Interface(ner, | |
| gr.Textbox(placeholder="Inserisci una frase qui..."), | |
| gr.HighlightedText(), | |
| examples=examples) | |
| demo.launch() | |
