Update app.py
Browse files
app.py
CHANGED
@@ -39,6 +39,42 @@ loading=("""
|
|
39 |
<div class="lds-ellipsis"><div></div><div></div><div></div><div></div></div>""")
|
40 |
|
41 |
def ac():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
def clear():
|
43 |
return gr.update(value=0),gr.update(value=0)
|
44 |
def start():
|
@@ -106,5 +142,4 @@ def ac():
|
|
106 |
#btn2.click(noth,None,message,cancels=[b1,sta,b2,b3,b4,b5,swi],show_progress=False)
|
107 |
btn2.click(clear_all, None,[fac_b,put,out1,out2,out3,out4,t_state,t_switch,message],cancels=[b1,sta,b2,b3,b4,b5,swi],show_progress=False)
|
108 |
b.queue(concurrency_count=100).launch(show_api=False)
|
109 |
-
interface = gr.Interface(fn=generate_image, inputs=[prompt_field], outputs=[image_preview], title="Text-to-Image")
|
110 |
ac()
|
|
|
39 |
<div class="lds-ellipsis"><div></div><div></div><div></div><div></div></div>""")
|
40 |
|
41 |
def ac():
|
42 |
+
# ... (functions for button logic and image generation)
|
43 |
+
|
44 |
+
with gr.Blocks() as b:
|
45 |
+
with gr.Row():
|
46 |
+
# Title and description
|
47 |
+
gr.Markdown("## Text-to-Image Generator with Juggernaut-XL-v8")
|
48 |
+
gr.Markdown(
|
49 |
+
"""
|
50 |
+
**Description:**
|
51 |
+
|
52 |
+
This Gradio interface harnesses the power of 20 Juggernaut-XL-v8 models to create breathtaking images from your text prompts.
|
53 |
+
|
54 |
+
**Features:**
|
55 |
+
|
56 |
+
- Parallel processing for faster generation
|
57 |
+
- Timeout handling for complex prompts
|
58 |
+
- Clear progress indicators
|
59 |
+
- Ability to generate multiple images sequentially
|
60 |
+
- User-friendly interface
|
61 |
+
|
62 |
+
**Instructions:**
|
63 |
+
|
64 |
+
1. Enter your text prompt in the text box.
|
65 |
+
2. Click the "Create" button.
|
66 |
+
3. Watch as up to 4 images are generated sequentially.
|
67 |
+
4. Click "Clear" to start a new prompt.
|
68 |
+
|
69 |
+
**Tips:**
|
70 |
+
|
71 |
+
- Use descriptive and imaginative prompts for best results.
|
72 |
+
- Experiment with different prompts and styles.
|
73 |
+
- Be patient, as complex prompts may take longer to generate.
|
74 |
+
"""
|
75 |
+
)
|
76 |
+
|
77 |
+
# ... (rest of your interface layout)
|
78 |
def clear():
|
79 |
return gr.update(value=0),gr.update(value=0)
|
80 |
def start():
|
|
|
142 |
#btn2.click(noth,None,message,cancels=[b1,sta,b2,b3,b4,b5,swi],show_progress=False)
|
143 |
btn2.click(clear_all, None,[fac_b,put,out1,out2,out3,out4,t_state,t_switch,message],cancels=[b1,sta,b2,b3,b4,b5,swi],show_progress=False)
|
144 |
b.queue(concurrency_count=100).launch(show_api=False)
|
|
|
145 |
ac()
|