摘要:
from PIL import Image, ImageDraw, ImageFont def add_text_to_image(image_path, text, font_path, font_size, text_color): image = Image.open(image_path) 阅读全文
posted @ 2023-02-01 23:57
无恙大势
阅读(347)
评论(0)
推荐(0)
摘要:
需要在文件目录下面建一个urls.txt的文件,将所有要推送的url放到文本里。然后运行下面的脚本。 import requests def baidu_push(url, token): headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0 阅读全文
posted @ 2023-02-01 23:52
无恙大势
阅读(157)
评论(0)
推荐(0)
摘要:
def read_txt_file(file_path): with open(file_path, 'r') as file: lines = file.readlines() return lines 阅读全文
posted @ 2023-02-01 23:30
无恙大势
阅读(195)
评论(0)
推荐(0)
摘要:
import requests def upload_image(image_binary, image_url): headers = {'Content-Type': 'image/jpeg'} response = requests.post(image_url, data=image_bin 阅读全文
posted @ 2023-02-01 23:07
无恙大势
阅读(283)
评论(0)
推荐(0)
摘要:
import requests def generate_text(prompt, model, api_key): url = "https://api.openai.com/v1/engines/text-davinci-002/jobs" headers = { "Content-Type": 阅读全文
posted @ 2023-02-01 23:04
无恙大势
阅读(1879)
评论(1)
推荐(0)

浙公网安备 33010602011771号