iuliaturc / detextify

Remove text from AI-generated images
MIT License
240 stars 22 forks source link

Help with Error on OpenIA #39

Open xdougx opened 5 months ago

xdougx commented 5 months ago

Hello, when i try to use OpenIA give me an error:

 "message": "The server had an error processing your request. Sorry about that! You can retry your request, or contact us through our help center at help.openai.com if you keep seeing this error. (Please include the request ID f7faf3e9b54568b8d4a0d5d7d54ff010 in your email.)",
xdougx commented 5 months ago

my code:

from detextify.text_detector import TesseractTextDetector

from detextify.inpainter import DalleInpainter
from detextify.detextifier import Detextifier

import requests

text_detector = TesseractTextDetector("/usr/bin/tesseract")

inpainter = DalleInpainter("<key>")

# inpainter = LocalSDInpainter()

detextifier = Detextifier(text_detector, inpainter)

img_data = requests.get('https://img.ahazou.com/ahz-posts/f2f08569-3a72-4870-8a44-5e83a0cd2a7d/midia/post-68123b14-dd48-446a-9e9c-868401c37a2a.png?tr=w-512,q-90,f-png').content

with open("teste_1.png", "wb") as handler:
    handler.write(img_data)

detextifier.detextify("teste_1.png", "teste_1_out.png")