mrbeliever commited on
Commit
6cf94b4
1 Parent(s): 04e02d2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -22
app.py CHANGED
@@ -1,24 +1,3 @@
1
  import gradio as gr
2
 
3
- # Load the model
4
- model = gr.load("models/stablediffusionapi/juggernaut-xl-v5")
5
-
6
- # Define the function to generate image
7
- def generate_image(text_input):
8
- # Call your model to generate the image based on the text input
9
- generated_image = model(text_input)
10
- return generated_image
11
-
12
- # Customize the interface
13
- iface = gr.Interface(
14
- fn=generate_image,
15
- live=True,
16
- title="Text-to-Image Generator",
17
- description="The image will be generated automatically when you enter text.",
18
- inputs="text",
19
- outputs="image", # Set outputs to "image" for image output
20
- interpretation="default", # Automatically updates without a button
21
- )
22
-
23
- # Launch the customized interface
24
- iface.launch()
 
1
  import gradio as gr
2
 
3
+ gr.load("models/stablediffusionapi/juggernaut-xl-v5").launch(title="Text To Image")