Planetoid's API official library to access free APIs
Planetoid's official library to access free APIs!
- Python 3
-
Install pip package
pip install planetoidAI
Useful examples of how a project can be used.
Create a new python file anywhere, such as demo.py. Add code in the demo.py file, the sample code is as follows:
from planetoidAI import Planetoid
planetoid1 = Planetoid()
# Get_objects_from_image
object_list = planetoid1.get_objects_from_image("FILENAME.jpg")
print(object_list)
[{
'name': 'Object',
'class_name': 'person',
'score': 0.5407423377037048,
'y': 0.215625, 'x': 0.090625, 'height': 0.984375, 'width': 0.896875
}]
from planetoidAI import Planetoid
planetoid1 = Planetoid()
# Get_face_location_from_image
face_276 = planetoid1.get_face_location_from_image( filename= "FILENAME.jpeg")
print(face_276)
[{
'name': 'Object',
'class_name': 'face',
'score': 0.9999943971633911,
'y': 0.30875, 'x': 0.32625, 'height': 0.65375, 'width': 0.67125
}]
from planetoidAI import Planetoid
planetoid1 = Planetoid()
# Get_age_gender_from_image
age_gender = planetoid1.get_age_gender_from_image("FILENAME.jpeg")
print(age_gender)
[{
'name': 'Object',
'class_name': 'male,
Age: (15-17)',
'score': 0.4520128,
'y': 0.30875, 'x': 0.32625, 'height': 0.65375, 'width': 0.67125
}]
from planetoidAI import Planetoid
planetoid1 = Planetoid()
# Get_face_race_from_image
nationality = planetoid1.get_face_race_from_image("FILEMNAME.jpeg")
print(nationality)
[{
'name': 'Object',
'class_name': 'Indian',
'score': 0.97603726,
'y': 0.30875, 'x': 0.32625, 'height': 0.65375, 'width': 0.67125
}]
from planetoidAI import Planetoid
planetoid1 = Planetoid()
# Get_translation
translation = planetoid1.get_translation("hello", translate_to='gu')
print(translation)
{'translation': 'નમસ્તે'}
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt
for more information.
Himanshu Molya
Project Link: https://github.com/HimanshuMoliya/planetoid