Skip to content

bazzmx/UOC_TFG_ATR

Repository files navigation

Construir y ejecutar el dockerfile

docker build -f Dockerfile -t tfg:local . 
docker run -d -p 8080:8000 -v $(pwd)/data:/app/data  --env-file .env --name tfg  tfg:local

Subir la imagen a dockerhub

docker tag tfg {{dockerhub-username}}/tfg:latest
docker push {{dockerhub-username}}/tfg:latest

Desplegar la aplicación con Heroku

heroku container:login
heroku create text-simplification
heroku container:push web --app text-simplification
heroku container:release web --app text-simplification
heroku open --app text-simplification

Diagrama de secuencia

sequenceDiagram
    participant Client
    participant FastAPI
    participant SimplificationService
    participant OpenAI
    participant SQLite

    Client->>FastAPI: POST /process (text)
    FastAPI->>FastAPI: Extract input.text and log
    FastAPI->>SimplificationService: text_simplification(input)
    SimplificationService->>OpenAI: Generate prompt and send request
    OpenAI-->>SimplificationService: Response with simplified text
    SimplificationService->>FastAPI: Return output_text and metadata
    FastAPI->>SQLite: save_with_raw_response(input, output, full_response)
    SQLite-->>FastAPI: OK
    FastAPI-->>Client: JSON { "output": result }
Loading

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors