Update README.md
Browse files
README.md
CHANGED
|
@@ -1,25 +1,42 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: cc-by-nc-4.0
|
| 3 |
-
---
|
| 4 |
-
|
| 5 |
-
BriaFibo Gemini Prompt to JSON
|
| 6 |
-
|
| 7 |
-
This is a modular pipeline block that converts a prompt to a JSON object using the FIBO-VLM model.
|
| 8 |
-
|
| 9 |
-
## Usage
|
| 10 |
-
|
| 11 |
-
```python
|
| 12 |
-
from diffusers.modular_pipelines import ModularPipeline
|
| 13 |
-
|
| 14 |
-
pipeline = ModularPipeline.from_pretrained("briaai/FIBO-VLM-prompt-to-JSON", trust_remote_code=True)
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
- `json_prompt`: A JSON object representing the prompt.
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc-by-nc-4.0
|
| 3 |
+
---
|
| 4 |
+
|
| 5 |
+
BriaFibo Gemini Prompt to JSON
|
| 6 |
+
|
| 7 |
+
This is a modular pipeline block that converts a prompt to a JSON object using the FIBO-VLM model.
|
| 8 |
+
|
| 9 |
+
## Usage
|
| 10 |
+
|
| 11 |
+
```python
|
| 12 |
+
from diffusers.modular_pipelines import ModularPipeline
|
| 13 |
+
|
| 14 |
+
pipeline = ModularPipeline.from_pretrained("briaai/FIBO-VLM-prompt-to-JSON", trust_remote_code=True)
|
| 15 |
+
# Generate - short text to JSON
|
| 16 |
+
output = pipeline(prompt="A beautiful sunset over a calm ocean")
|
| 17 |
+
print(output)
|
| 18 |
+
|
| 19 |
+
# Refine - JSON+instruction to JSON
|
| 20 |
+
output = pipeline(
|
| 21 |
+
json_prompt=your_json_prompt, prompt="make the owl brown"
|
| 22 |
+
)
|
| 23 |
+
|
| 24 |
+
# Inspire - Image+instruction to JSON
|
| 25 |
+
output = pipeline(
|
| 26 |
+
image=your_image, prompt="your prompt"
|
| 27 |
+
)
|
| 28 |
+
|
| 29 |
+
# Inspirt - Image to JSON
|
| 30 |
+
pipeline(
|
| 31 |
+
image=your_image
|
| 32 |
+
)
|
| 33 |
+
|
| 34 |
+
```
|
| 35 |
+
|
| 36 |
+
## Inputs
|
| 37 |
+
|
| 38 |
+
- `prompt`: A string prompt to convert to a JSON object.
|
| 39 |
+
|
| 40 |
+
## Outputs
|
| 41 |
+
|
| 42 |
- `json_prompt`: A JSON object representing the prompt.
|