defhouse commited on
Commit
de4bebf
·
verified ·
1 Parent(s): 151ce1c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +0 -17
README.md CHANGED
@@ -8,23 +8,6 @@ instance_prompt: ksrksr
8
  license: mit
9
  pipeline_tag: text-to-image
10
  ---
11
- import requests
12
-
13
- API_URL = "https://api-inference.huggingface.co/models/black-forest-labs/FLUX.1-dev"
14
- headers = {"Authorization": "Bearer hf_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}
15
-
16
- def query(payload):
17
- response = requests.post(API_URL, headers=headers, json=payload)
18
- return response.content
19
- image_bytes = query({
20
- "inputs": "Astronaut riding a horse",
21
- })
22
- # You can access the image with PIL.Image for example
23
- import io
24
- from PIL import Image
25
- image = Image.open(io.BytesIO(image_bytes))
26
-
27
-
28
 
29
  ---
30
  tags:
 
8
  license: mit
9
  pipeline_tag: text-to-image
10
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
 
12
  ---
13
  tags: