R0bertas / prompt_hostinger

ai-developer.zyrosite.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

----How to execute without docker

open terminal and run the following commands

python app.py

open another terminal and run the following commands

 curl -u your_username:your_password -X POST -H "Content-Type: application/json" -d '{"text": "Original text goes here.", "number_of_variants": 2}' http://localhost:5000/rephrase

----Docker

open terminal and run the following commands

docker build -t your-app-name .

docker run -e OPENAI_API_KEY=your_key -p 5000:5000 your-app-name

if you get error docker: Error response from daemon: Ports are not available: exposing port TCP 0.0.0.0:5000 -> 0.0.0.0:0: listen tcp 0.0.0.0:5000: bind: address already in use. ERRO[0000] error waiting for container

modify docker file to use different port etc 5001

Future update suggestions:

  1. Use oauth for authentication
  2. Add specific language detect model
  3. Add test cases
  4. Add pydantic for validation
  5. Add limitation for number_of_variants
  6. Provide limitation on a response size
  7. Use other than flask framework( FastApi)

curl -u your_username:your_password -X POST -H "Content-Type: application/json" -d '{"text": "Original text goes here.", "number_of_variants": 2}' http://localhost:5000/rephrase

curl -u your_username:your_password -X POST -H "Content-Type: application/json" -d '{ "description": "User business description", "sections": { "about": { "title": 1, "description": 2 }, "refunds": { "title": 1, "description": 1 }, "hero": { "title": 1, "subtitle": 1 } } }' http://localhost:5000/generate-content

About

ai-developer.zyrosite.com/


Languages

Language:Python 94.7%Language:Dockerfile 5.3%