Update app.py
Browse files
app.py
CHANGED
|
@@ -6,8 +6,8 @@ from transformers import (
|
|
| 6 |
)
|
| 7 |
|
| 8 |
# 1) Carga manual del modelo y el tokenizador
|
| 9 |
-
model = AutoModelForSequenceClassification.from_pretrained("alramil/
|
| 10 |
-
tokenizer = AutoTokenizer.from_pretrained("alramil/
|
| 11 |
|
| 12 |
# 2) Construye la pipeline
|
| 13 |
classifier = TextClassificationPipeline(
|
|
@@ -29,7 +29,7 @@ demo = gr.Interface(
|
|
| 29 |
inputs=gr.Textbox(lines=3, placeholder="Escribe aquí tu texto"),
|
| 30 |
outputs="text",
|
| 31 |
title="Clasificador de Texto Peligroso",
|
| 32 |
-
description="Detecta si un mensaje es seguro o peligroso usando tu modelo
|
| 33 |
)
|
| 34 |
|
| 35 |
if __name__ == "__main__":
|
|
|
|
| 6 |
)
|
| 7 |
|
| 8 |
# 1) Carga manual del modelo y el tokenizador
|
| 9 |
+
model = AutoModelForSequenceClassification.from_pretrained("alramil/Practica7MA")
|
| 10 |
+
tokenizer = AutoTokenizer.from_pretrained("alramil/Practica7MA")
|
| 11 |
|
| 12 |
# 2) Construye la pipeline
|
| 13 |
classifier = TextClassificationPipeline(
|
|
|
|
| 29 |
inputs=gr.Textbox(lines=3, placeholder="Escribe aquí tu texto"),
|
| 30 |
outputs="text",
|
| 31 |
title="Clasificador de Texto Peligroso",
|
| 32 |
+
description="Detecta si un mensaje es seguro o peligroso usando tu modelo Practica7MA alojado en HF Hub."
|
| 33 |
)
|
| 34 |
|
| 35 |
if __name__ == "__main__":
|