Spaces:
Sleeping
Sleeping
Update ProyectoBasura.py
Browse files- ProyectoBasura.py +8 -0
ProyectoBasura.py
CHANGED
|
@@ -280,7 +280,15 @@ async def detectar_visual(file: UploadFile = File(...), token: str = Depends(oau
|
|
| 280 |
confianza=confianza_valor
|
| 281 |
)
|
| 282 |
db.add(nueva_imagen)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 283 |
db.commit()
|
|
|
|
| 284 |
im_array = results.plot()
|
| 285 |
im_rgb = Image.fromarray(im_array[..., ::-1])
|
| 286 |
|
|
|
|
| 280 |
confianza=confianza_valor
|
| 281 |
)
|
| 282 |
db.add(nueva_imagen)
|
| 283 |
+
|
| 284 |
+
nuevo_historial = modelsProyecto.HistorialChat(
|
| 285 |
+
usuario_id=usuario.id,
|
| 286 |
+
mensaje_usuario=f"Detección de {prediccion_nombre}",
|
| 287 |
+
respuesta_agente=respuesta_agente
|
| 288 |
+
)
|
| 289 |
+
db.add(nuevo_historial)
|
| 290 |
db.commit()
|
| 291 |
+
|
| 292 |
im_array = results.plot()
|
| 293 |
im_rgb = Image.fromarray(im_array[..., ::-1])
|
| 294 |
|