Kvikontent
commited on
Update README.md
Browse files
README.md
CHANGED
@@ -27,4 +27,32 @@ widget:
|
|
27 |
A professional photo of a woman in blue particles
|
28 |
output:
|
29 |
url: images/woman.png
|
30 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
A professional photo of a woman in blue particles
|
28 |
output:
|
29 |
url: images/woman.png
|
30 |
+
---
|
31 |
+
# Midjourney V7
|
32 |
+
|
33 |
+
Midjourney is most realistic and powerful ai image generator in the world. Here is is Stable Diffusion LoRA model trained on 100k+ midjourney V6 images.
|
34 |
+
|
35 |
+
## Examples
|
36 |
+
|
37 |
+
<Gallery />
|
38 |
+
|
39 |
+
## Usage
|
40 |
+
|
41 |
+
You can use this model using huggingface Interface API:
|
42 |
+
```Python
|
43 |
+
import requests
|
44 |
+
|
45 |
+
API_URL = "https://api-inference.huggingface.co/models/Kvikontent/midjourney-v7"
|
46 |
+
headers = {"Authorization": "Bearer HUGGINGFACE_API_TOKEN"}
|
47 |
+
|
48 |
+
def query(payload):
|
49 |
+
response = requests.post(API_URL, headers=headers, json=payload)
|
50 |
+
return response.content
|
51 |
+
image_bytes = query({
|
52 |
+
"inputs": "Astronaut riding a horse",
|
53 |
+
})
|
54 |
+
# You can access the image with PIL.Image for example
|
55 |
+
import io
|
56 |
+
from PIL import Image
|
57 |
+
image = Image.open(io.BytesIO(image_bytes))
|
58 |
+
```
|