Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,22 +1,3 @@
|
|
1 |
import gradio as gr
|
2 |
|
3 |
-
|
4 |
-
model = gr.load("models/black-forest-labs/FLUX.1-schnell")
|
5 |
-
return model(prompt)
|
6 |
-
|
7 |
-
with gr.Blocks() as demo:
|
8 |
-
gr.Markdown("# Text to Image Generator")
|
9 |
-
gr.Markdown("Enter a text prompt to generate an image using the FLUX.1-dev model.")
|
10 |
-
|
11 |
-
with gr.Row():
|
12 |
-
with gr.Column(scale=4):
|
13 |
-
text_input = gr.Textbox(label="Text Prompt", placeholder="Enter your prompt here...")
|
14 |
-
with gr.Column(scale=1):
|
15 |
-
submit_button = gr.Button("Generate Image")
|
16 |
-
|
17 |
-
image_output = gr.Image(label="Generated Image")
|
18 |
-
|
19 |
-
submit_button.click(fn=generate_image, inputs=text_input, outputs=image_output)
|
20 |
-
|
21 |
-
if __name__ == "__main__":
|
22 |
-
.launch()
|
|
|
1 |
import gradio as gr
|
2 |
|
3 |
+
gr.load("models/black-forest-labs/FLUX.1-schnell").launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|