Commit
·
c04b9a0
1
Parent(s):
c1083c5
Update README.md
Browse files
README.md
CHANGED
@@ -17,6 +17,8 @@ pipeline_tag: text-to-image
|
|
17 |
|
18 |
# AI Model Text-to-Image Midjourney-mini
|
19 |
|
|
|
|
|
20 |
Midjourney-mini is a free artificial intelligence model that can create realistic images based on textual descriptions. It has the following advantages:
|
21 |
|
22 |
- **Free:** Midjourney-mini is completely free to use for anyone.
|
@@ -25,6 +27,44 @@ Midjourney-mini is a free artificial intelligence model that can create realisti
|
|
25 |
|
26 |
Although Midjoureymini is a trimmed-down version of the paid MIjdoureny modle, it still provides powerful functionality and can be used in various applications.
|
27 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
|
29 |
## Links
|
30 |
-[GitHub](https://github.com/minhthangdang/MidJoureny)
|
|
|
17 |
|
18 |
# AI Model Text-to-Image Midjourney-mini
|
19 |
|
20 |
+
## Description
|
21 |
+
|
22 |
Midjourney-mini is a free artificial intelligence model that can create realistic images based on textual descriptions. It has the following advantages:
|
23 |
|
24 |
- **Free:** Midjourney-mini is completely free to use for anyone.
|
|
|
27 |
|
28 |
Although Midjoureymini is a trimmed-down version of the paid MIjdoureny modle, it still provides powerful functionality and can be used in various applications.
|
29 |
|
30 |
+
# Use
|
31 |
+
|
32 |
+
|
33 |
+
## In Diffusers
|
34 |
+
|
35 |
+
```
|
36 |
+
from diffusers import DiffusionPipeline
|
37 |
+
|
38 |
+
pipeline = DiffusionPipeline.from_pretrained("midjourney-community/midjourney-mini")
|
39 |
+
```
|
40 |
+
|
41 |
+
## Deploy in Spaces
|
42 |
+
|
43 |
+
```
|
44 |
+
import gradio as gr
|
45 |
+
|
46 |
+
gr.Interface.load("models/midjourney-community/midjourney-mini").launch()
|
47 |
+
```
|
48 |
+
|
49 |
+
## Deploy in Inference API
|
50 |
+
|
51 |
+
```
|
52 |
+
import requests
|
53 |
+
|
54 |
+
API_URL = "https://api-inference.huggingface.co/models/midjourney-community/midjourney-mini"
|
55 |
+
headers = {"Authorization": "Bearer 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"}
|
56 |
+
|
57 |
+
def query(payload):
|
58 |
+
response = requests.post(API_URL, headers=headers, json=payload)
|
59 |
+
return response.content
|
60 |
+
image_bytes = query({
|
61 |
+
"inputs": "Astronaut riding a horse",
|
62 |
+
})
|
63 |
+
# You can access the image with PIL.Image for example
|
64 |
+
import io
|
65 |
+
from PIL import Image
|
66 |
+
image = Image.open(io.BytesIO(image_bytes))
|
67 |
+
```
|
68 |
|
69 |
## Links
|
70 |
-[GitHub](https://github.com/minhthangdang/MidJoureny)
|