Downloads · 30 days
0
Thomas121/Thomas
Thomas is a machine learning model from Thomas121. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Downloads · 30 days
0
Access
Public
Updated May 1, 2024
Repo size
—
Likes
0
Public
Click a slice to open those files.
Other1.5 KB · 76%
From the Hugging Face model README
import requests
API_URL = "https://api-inference.huggingface.co/models/Kvikontent/midjourney-v6" headers = {"Authorization": "Bearer HUGGINGFACE_API_TOKEN"}
def query(payload): response = requests.post(API_URL, headers=headers, json=payload) return response.content image_bytes = query({ "inputs": "Astronaut riding a horse", })
import io from PIL import Image image = Image.open(io.BytesIO(image_bytes))