The python package for api.qewertyy.me
Project description
LLM's
from lexica import Client, languageModels
def main(prompt: str) -> dict:
client = Client()
response = client.palm(prompt,languageModels.palm2)
return response
if __name__ == "__main__":
print(main("hello world"))
Upscale an image.
from lexica import Client
def main(image: bytes) -> bytes:
client = Client()
imageBytes = client.upscale(image)
with open('upscaled.png', 'wb') as f:
f.write(imageBytes)
if __name__ == "__main__":
image = open('examples/images/image.png', 'rb').read()
main(image)
Anti-NSFW
from lexica import Client
def main(image_url: str) -> dict:
client = Client()
response = client.AntiNsfw(image_url)
if response['content']['sfw'] == True:
return "This image is safe for work."
else:
return "This image is not safe for work."
if __name__ == "__main__":
print(main("https://graph.org/file/13e95c6cc932530823391.png"))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
lexica-api-1.5.5.tar.gz
(6.1 kB
view details)
File details
Details for the file lexica-api-1.5.5.tar.gz
.
File metadata
- Download URL: lexica-api-1.5.5.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd8ba478aaf1f5c4ddc67cc8d46d7d49a439da6603ba2a837bf04c81406980eb |
|
MD5 | f0d8853187d62552d1bfc6251a5f57a2 |
|
BLAKE2b-256 | 48487551476577c19e99304eced9a4517adb031bcbcd450ee82f9de646383ba3 |