# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

import base64
import io
from PIL import Image
import urllib
from urllib.request import urlopen, Request
import os
import requests
import json

apikey = '<KEY>'
apisecret = '<KEY>'
url = 'https://api-cn.faceplusplus.com/imagepp/v1/recognizetext?' + 'api_key=' + apikey + '&api_secret=' + apisecret

params = { 'image_file': open('./0.jpg', 'rb')}
r = requests.post(url, files = params)
text = r.text

json.dumps(text, sort_keys=True, indent =4, separators=(',', ': '))



StarcoderdataJupyterScriptsDedupFiltered