juanpablosanchez commited on
Commit
277491c
·
verified ·
1 Parent(s): 6d5f281

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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" # Cambiado al nuevo modelo
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)