Update app.py
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ import requests
|
|
11 |
app = FastAPI()
|
12 |
|
13 |
# Cargar el modelo y el tokenizador
|
14 |
-
model_name = "mdarhri00/named-entity-recognition"
|
15 |
model = AutoModelForTokenClassification.from_pretrained(model_name)
|
16 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
17 |
|
@@ -54,4 +54,4 @@ def predict_gradio(text):
|
|
54 |
return entities
|
55 |
|
56 |
demo = gr.Interface(fn=predict_gradio, inputs="text", outputs="json")
|
57 |
-
demo.launch(share=True)
|
|
|
11 |
app = FastAPI()
|
12 |
|
13 |
# Cargar el modelo y el tokenizador
|
14 |
+
model_name = "mdarhri00/named-entity-recognition"
|
15 |
model = AutoModelForTokenClassification.from_pretrained(model_name)
|
16 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
17 |
|
|
|
54 |
return entities
|
55 |
|
56 |
demo = gr.Interface(fn=predict_gradio, inputs="text", outputs="json")
|
57 |
+
demo.launch(share=True)
|