Spaces:
Sleeping
Sleeping
Deploy from Gradio Workflow Builder
Browse files- app.py +4 -4
- workflow.json +22 -11
app.py
CHANGED
|
@@ -1,14 +1,14 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
-
generate_image_app = gr.load("black-forest-labs/FLUX.1-schnell")
|
| 4 |
|
| 5 |
-
def pipeline(textbox, textbox_2):
|
| 6 |
-
generate_image = generate_image_app(
|
| 7 |
return generate_image
|
| 8 |
|
| 9 |
demo = gr.Interface(
|
| 10 |
fn=pipeline,
|
| 11 |
-
inputs=[gr.Textbox(), gr.Textbox()],
|
| 12 |
outputs=[gr.Image()],
|
| 13 |
title="Text to image",
|
| 14 |
)
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
+
generate_image_app = gr.load("black-forest-labs/FLUX.1-schnell", src="spaces")
|
| 4 |
|
| 5 |
+
def pipeline(textbox, textbox_2, textbox_3):
|
| 6 |
+
generate_image = generate_image_app(None)
|
| 7 |
return generate_image
|
| 8 |
|
| 9 |
demo = gr.Interface(
|
| 10 |
fn=pipeline,
|
| 11 |
+
inputs=[gr.Textbox(), gr.Textbox(), gr.Textbox()],
|
| 12 |
outputs=[gr.Image()],
|
| 13 |
title="Text to image",
|
| 14 |
)
|
workflow.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
| 18 |
"x": 93,
|
| 19 |
"y": 58,
|
| 20 |
"width": 220,
|
| 21 |
-
"height":
|
| 22 |
"data": {}
|
| 23 |
},
|
| 24 |
{
|
|
@@ -45,7 +45,7 @@
|
|
| 45 |
"x": 420,
|
| 46 |
"y": 120,
|
| 47 |
"width": 200,
|
| 48 |
-
"height":
|
| 49 |
"data": {}
|
| 50 |
},
|
| 51 |
{
|
|
@@ -86,22 +86,33 @@
|
|
| 86 |
],
|
| 87 |
"inputs": [],
|
| 88 |
"width": 220,
|
| 89 |
-
"height":
|
| 90 |
"id": "b6ab8e60-9a5a-4180-85b2-6b0cd8dd701e",
|
| 91 |
"x": 168,
|
| 92 |
"y": 373,
|
| 93 |
"data": {}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 94 |
}
|
| 95 |
],
|
| 96 |
"edges": [
|
| 97 |
-
{
|
| 98 |
-
"id": "e1",
|
| 99 |
-
"from_node_id": "t1",
|
| 100 |
-
"from_port_id": "out",
|
| 101 |
-
"to_node_id": "t2",
|
| 102 |
-
"to_port_id": "in",
|
| 103 |
-
"type": "text"
|
| 104 |
-
},
|
| 105 |
{
|
| 106 |
"id": "e2",
|
| 107 |
"from_node_id": "t2",
|
|
|
|
| 18 |
"x": 93,
|
| 19 |
"y": 58,
|
| 20 |
"width": 220,
|
| 21 |
+
"height": 145,
|
| 22 |
"data": {}
|
| 23 |
},
|
| 24 |
{
|
|
|
|
| 45 |
"x": 420,
|
| 46 |
"y": 120,
|
| 47 |
"width": 200,
|
| 48 |
+
"height": 180,
|
| 49 |
"data": {}
|
| 50 |
},
|
| 51 |
{
|
|
|
|
| 86 |
],
|
| 87 |
"inputs": [],
|
| 88 |
"width": 220,
|
| 89 |
+
"height": 145,
|
| 90 |
"id": "b6ab8e60-9a5a-4180-85b2-6b0cd8dd701e",
|
| 91 |
"x": 168,
|
| 92 |
"y": 373,
|
| 93 |
"data": {}
|
| 94 |
+
},
|
| 95 |
+
{
|
| 96 |
+
"label": "Textbox",
|
| 97 |
+
"kind": "input",
|
| 98 |
+
"source": "local",
|
| 99 |
+
"outputs": [
|
| 100 |
+
{
|
| 101 |
+
"id": "out",
|
| 102 |
+
"label": "Text",
|
| 103 |
+
"type": "text"
|
| 104 |
+
}
|
| 105 |
+
],
|
| 106 |
+
"inputs": [],
|
| 107 |
+
"width": 220,
|
| 108 |
+
"height": 145,
|
| 109 |
+
"id": "29571801-8f9c-4d78-9c16-4af5169d60aa",
|
| 110 |
+
"x": 112,
|
| 111 |
+
"y": 167,
|
| 112 |
+
"data": {}
|
| 113 |
}
|
| 114 |
],
|
| 115 |
"edges": [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 116 |
{
|
| 117 |
"id": "e2",
|
| 118 |
"from_node_id": "t2",
|