Unkowndev commited on
Commit
d3dfc8b
·
verified ·
1 Parent(s): 4a50cdc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -20
app.py CHANGED
@@ -1,22 +1,3 @@
1
  import gradio as gr
2
 
3
- def generate_image(prompt):
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()