Aklavya commited on
Commit
28d7e35
·
verified ·
1 Parent(s): 4e728ac

Indentation fixed

Browse files
Files changed (1) hide show
  1. app.py +35 -55
app.py CHANGED
@@ -12,8 +12,8 @@ from typing import Tuple
12
  def apply_style(style_name: str, positive: str, negative: str = "") -> Tuple[str, str]:
13
  styles = {
14
  "3840 x 2160": (
15
- "hyper-realistic 8K image of {prompt}. ultra-detailed, lifelike, high-resolution, sharp, vibrant colors, photorealistic",
16
- "cartoonish, low resolution, blurry, simplistic, abstract, deformed, ugly",
17
  ),
18
  "Style Zero": ("{prompt}", ""),
19
  }
@@ -85,38 +85,39 @@ with gr.Blocks(theme="soft") as demo:
85
  gr.Markdown("<h2 style='text-align:center; color:white; font-weight:bold; text-decoration:underline;'>Developed using RealVisXL_V5.0_Lightning model with ❤ by Aklavya</h2>")
86
 
87
  with gr.Row():
88
- with gr.Column(scale=3):
89
- prompt = gr.Textbox(
90
- label="Input Prompt",
91
- placeholder="Describe the image you want to create",
92
- lines=2,
93
- )
94
- run_button = gr.Button("Generate Image")
95
-
96
- # Example prompts box with Copy to Clipboard button
97
- example_prompts_text = (
98
- "Dew-covered spider web in morning sunlight, with blurred greenery\n"
99
- "--------------------------------------------\n"
100
- "Glass of cold water with ice cubes and condensation on a wooden table\n"
101
- "--------------------------------------------\n"
102
- "Coffee cup with latte art, steam rising, and morning sunlight\n"
103
- "--------------------------------------------\n"
104
- "Autumn forest with golden leaves, sunlight through trees, and a breeze"
105
- )
106
-
107
- example_prompts = gr.Textbox(
108
- value=example_prompts_text,
109
- lines=5,
110
- label="Sample Inputs",
111
- interactive=False,
112
- )
113
- with gr.Column(scale=7):
114
- result_image = gr.Image(
115
- label="Generated Image",
116
- type="filepath",
117
- elem_id="output_image",
118
- height=1024 # Increased the height by 100%
119
- )
 
120
 
121
  run_button.click(
122
  fn=generate,
@@ -124,25 +125,4 @@ with gr.Blocks(theme="soft") as demo:
124
  outputs=[result_image],
125
  )
126
 
127
- # # Footer with custom style and text
128
- # gr.Markdown("""
129
- # <style>
130
- # .footer {
131
- # position: relative;
132
- # left: 0;
133
- # bottom: 0;
134
- # width: 100%;
135
- # background-color: white;
136
- # color: black;
137
- # text-align: center;
138
- # }
139
- # #output_image {
140
- # height: calc(100% + 512px); /* Dynamically increases height by 100% */
141
- # }
142
- # </style>
143
- # <div class="footer">
144
- # <p>Developed with ❤ by Aklavya(Bucky)</p>
145
- # </div>
146
- # """)
147
-
148
  demo.launch()
 
12
  def apply_style(style_name: str, positive: str, negative: str = "") -> Tuple[str, str]:
13
  styles = {
14
  "3840 x 2160": (
15
+ "hyper-realistic image of {prompt}. lifelike, authentic, natural colors, true-to-life details, realistic lighting, immersive, highly detailed",
16
+ "unrealistic, low resolution, artificial, over-saturated, distorted, fake",
17
  ),
18
  "Style Zero": ("{prompt}", ""),
19
  }
 
85
  gr.Markdown("<h2 style='text-align:center; color:white; font-weight:bold; text-decoration:underline;'>Developed using RealVisXL_V5.0_Lightning model with ❤ by Aklavya</h2>")
86
 
87
  with gr.Row():
88
+ with gr.Column(scale=3):
89
+ prompt = gr.Textbox(
90
+ label="Input Prompt",
91
+ placeholder="Describe the image you want to create",
92
+ lines=2,
93
+ )
94
+ run_button = gr.Button("Generate Image")
95
+
96
+ # Example prompts box
97
+ example_prompts_text = (
98
+ "Dew-covered spider web in morning sunlight, with blurred greenery\n"
99
+ "--------------------------------------------\n"
100
+ "Glass of cold water with ice cubes and condensation on a wooden table\n"
101
+ "--------------------------------------------\n"
102
+ "Coffee cup with latte art, steam rising, and morning sunlight\n"
103
+ "--------------------------------------------\n"
104
+ "Autumn forest with golden leaves, sunlight through trees, and a breeze"
105
+ )
106
+
107
+ example_prompts = gr.Textbox(
108
+ value=example_prompts_text,
109
+ lines=5,
110
+ label="Sample Inputs",
111
+ interactive=False,
112
+ )
113
+
114
+ with gr.Column(scale=7):
115
+ result_image = gr.Image(
116
+ label="Generated Image",
117
+ type="filepath",
118
+ elem_id="output_image",
119
+ height=1024 # Increased the height by 100%
120
+ )
121
 
122
  run_button.click(
123
  fn=generate,
 
125
  outputs=[result_image],
126
  )
127
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
128
  demo.launch()