You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to use the following example from the git examples I get an error that all imported classes from redact like JobArguments,RedactInstance,ServiceType... Do not exist.
`from io import BytesIO
from matplotlib import pyplot as plt
from matplotlib.pyplot import imread
from redact import JobArguments, OutputType, RedactInstance, Region, ServiceType
def main():
# anonymize image
redact = RedactInstance.create(
service=ServiceType.blur,
out_type=OutputType.images,
redact_url="http://127.0.0.1:8787",
)
job_args = JobArguments(region=Region.united_states_of_america)
with open("tests/resources/obama.jpeg", "rb") as f:
job = redact.start_job(file=f, job_args=job_args)
result = job.wait_until_finished().download_result()
# show anonymized image
img = imread(BytesIO(result.content), format="jpg")
plt.imshow(img)
plt.show()
if name == "main":
main()`
The text was updated successfully, but these errors were encountered:
When I try to use the following example from the git examples I get an error that all imported classes from redact like JobArguments,RedactInstance,ServiceType... Do not exist.
`from io import BytesIO
from matplotlib import pyplot as plt
from matplotlib.pyplot import imread
from redact import JobArguments, OutputType, RedactInstance, Region, ServiceType
def main():
# anonymize image
redact = RedactInstance.create(
service=ServiceType.blur,
out_type=OutputType.images,
redact_url="http://127.0.0.1:8787",
)
job_args = JobArguments(region=Region.united_states_of_america)
with open("tests/resources/obama.jpeg", "rb") as f:
job = redact.start_job(file=f, job_args=job_args)
result = job.wait_until_finished().download_result()
if name == "main":
main()`
The text was updated successfully, but these errors were encountered: