Giter Site home page Giter Site logo

faces's People

Contributors

re1ard avatar vasilysinitsin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

faces's Issues

I've got an error, when i tried to save image.

"Please update! you are running an old version. Please update FaceApp to the latest one"
output

Here is my code

import faces

from PIL import Image
from io import BytesIO

sad = open("ivan.png", "rb")
image = faces.FaceAppImage(file=sad)
happy = image.apply_filter("smile", cropped=True)

image = Image.open(BytesIO(happy))
image.save("output.png", "PNG")

I think, you need to update api BASE_API_URL to "https://ph-x-p.faceapp.io/api/v2.3/photos". I tried to do this, but unfortunately, it doesn't work.

How to compare two photos?

Is there is a way to compare the photos and say if they are the same or different? Please reply as soon as possible!!

I am willing to find the new API URL.

Hey. Thanks for the awesome library. as of July 20, 2019, The API will return an image with a layer on top of it saying you need to update. I have a rooted device (if that matters). I tried capturing packets but it seems TCP stream is not readable. I am totally willing to find the new API URL. I only need to know how it was done till now. Any information on how to get the URL is appreciated

Max retries exceeded Error

I just installed via pip and saved your sample code(With file example) to a file, placed an image in proper path and ran. This is what I see

Traceback (most recent call last):
File "face.py", line 4, in
image = faces.FaceAppImage(file=sad)
File "/Users/ishandutta2007/.pyenv/versions/3.6.0/lib/python3.6/site-packages/faces/init.py", line 71, in init
post = requests.post(BASE_API_URL, headers=headers, files={'file': file})
File "/Users/ishandutta2007/.pyenv/versions/3.6.0/lib/python3.6/site-packages/requests/api.py", line 116, in post
return request('post', url, data=data, json=json, **kwargs)
File "/Users/ishandutta2007/.pyenv/versions/3.6.0/lib/python3.6/site-packages/requests/api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "/Users/ishandutta2007/.pyenv/versions/3.6.0/lib/python3.6/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/Users/ishandutta2007/.pyenv/versions/3.6.0/lib/python3.6/site-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/Users/ishandutta2007/.pyenv/versions/3.6.0/lib/python3.6/site-packages/requests/adapters.py", line 514, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='ph-x-p.faceapp.io', port=443): Max retries exceeded with url: /api/v2.11/photos (Caused by SSLError(SSLError("bad handshake: SysCallError(-1, 'Unexpected EOF')",),))

How to get output file?

Hi, Thanks for making this.
Unfortunately I can't get an output file.
I created a py file with htis 👍

import faces

sad = open('sad.jpg', 'rb')
image = faces.FaceAppImage(file=sad)
happy = image.apply_filter('smile', cropped=True)
happy.save('/home/user/Face/output.jpg')

But I get this error:

Traceback (most recent call last):
File "test.py", line 7, in
happy.save('/home/nfrederickx/Face/output.jpg')
AttributeError: 'str' object has no attribute 'save'

I have no idea what I'm doing.

Thanks for helping!

ConnectionError: ('Connection aborted.', OSError(0, 'Error'))

after running the code below, i got an error. Any idea?


import faces

old_rockfeller = 'https://upload.wikimedia.org/wikipedia/commons/6/6f/John_D._Rockefeller_1885.jpg'
image = faces.FaceAppImage(url=old_rockfeller)
young_rockfeller = image.apply_filter('young')

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.