arad1367 commited on
Commit
3319cd3
1 Parent(s): 7abf701

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +45 -19
app.py CHANGED
@@ -29,28 +29,57 @@ def infer(prompt, seed=42, randomize_seed=False, width=1024, height=1024, num_in
29
  return image, seed
30
 
31
  examples = [
32
- "A captivating Instagram post for a tourist page highlighting the beauty of Budapest",
33
- "A professional marketing advertisement featuring a stunning image of a luxury hotel in Budapest",
34
- "A compelling social media banner promoting a travel package to Budapest",
35
- "An engaging content piece for a travel blog showcasing the city's rich history and culture",
36
- "A visually appealing Instagram post promoting a local event in Budapest",
37
- "A marketing advertisement featuring a scenic image of Budapest's famous Chain Bridge",
38
- "A social media banner promoting a food tour in Budapest",
39
- "An Instagram post highlighting the vibrant nightlife of Budapest"
40
  ]
41
 
42
- css="""
43
  #col-container {
44
  margin: 0 auto;
45
- max-width: 520px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
  }
47
  """
48
 
49
  footer = """
50
- <div style="text-align: center; margin-top: 20px;">
51
  <a href="https://www.linkedin.com/in/pejman-ebrahimi-4a60151a7/" target="_blank">LinkedIn</a> |
52
  <a href="https://github.com/arad1367" target="_blank">GitHub</a> |
53
  <a href="https://arad1367.pythonanywhere.com/" target="_blank">Live demo of my PhD defense</a>
 
54
  <br>
55
  Made with 💖 by Pejman Ebrahimi
56
  </div>
@@ -62,25 +91,24 @@ with gr.Blocks(css=css, theme='gradio/soft') as demo:
62
  gr.Markdown("""
63
  # FLUX.1 Schnell Marketing Assistant
64
 
65
- This App is based on FLUX.1 schnell and can help you to manage your advertising activities, create new logo, marketing advertisement, banner for social media advertisement, or make exciting content for social networks.
66
- """)
67
 
68
  with gr.Row():
69
-
70
  prompt = gr.Text(
71
  label="Prompt",
72
  show_label=False,
73
  max_lines=1,
74
  placeholder="Enter your prompt",
75
  container=False,
 
76
  )
77
 
78
  run_button = gr.Button("Run", scale=0)
79
 
80
- result = gr.Image(label="Result", show_label=False)
81
-
82
- with gr.Accordion("Advanced Settings", open=False):
83
 
 
84
  seed = gr.Slider(
85
  label="Seed",
86
  minimum=0,
@@ -92,7 +120,6 @@ with gr.Blocks(css=css, theme='gradio/soft') as demo:
92
  randomize_seed = gr.Checkbox(label="Randomize seed", value=True)
93
 
94
  with gr.Row():
95
-
96
  width = gr.Slider(
97
  label="Width",
98
  minimum=256,
@@ -110,7 +137,6 @@ with gr.Blocks(css=css, theme='gradio/soft') as demo:
110
  )
111
 
112
  with gr.Row():
113
-
114
  num_inference_steps = gr.Slider(
115
  label="Number of inference steps",
116
  minimum=1,
 
29
  return image, seed
30
 
31
  examples = [
32
+ "Create a new logo for a tech startup",
33
+ "Design an engaging Instagram post for a fashion brand",
34
+ "Create a new character for a social media campaign",
35
+ "Generate a marketing advertisement for a new product launch",
36
+ "Design a social media banner for a charity event",
37
+ "Create a new branding concept for a luxury hotel",
38
+ "Design a promotional video thumbnail for a movie premiere",
39
+ "Generate a marketing campaign for a sustainable lifestyle brand"
40
  ]
41
 
42
+ css = """
43
  #col-container {
44
  margin: 0 auto;
45
+ max-width: 800px;
46
+ padding: 20px;
47
+ border-radius: 10px;
48
+ box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
49
+ }
50
+
51
+ #title {
52
+ text-align: center;
53
+ font-size: 32px;
54
+ font-weight: bold;
55
+ margin-bottom: 20px;
56
+ }
57
+
58
+ #prompt {
59
+ margin-bottom: 20px;
60
+ }
61
+
62
+ #result {
63
+ margin-bottom: 20px;
64
+ }
65
+
66
+ #advanced-settings {
67
+ margin-bottom: 20px;
68
+ }
69
+
70
+ #footer {
71
+ text-align: center;
72
+ font-size: 14px;
73
+ color: #888;
74
  }
75
  """
76
 
77
  footer = """
78
+ <div id="footer">
79
  <a href="https://www.linkedin.com/in/pejman-ebrahimi-4a60151a7/" target="_blank">LinkedIn</a> |
80
  <a href="https://github.com/arad1367" target="_blank">GitHub</a> |
81
  <a href="https://arad1367.pythonanywhere.com/" target="_blank">Live demo of my PhD defense</a>
82
+ <a href="https://huggingface.co/black-forest-labs/FLUX.1-schnell" target="_blank">black-forest-labs/FLUX.1-schnell</a>
83
  <br>
84
  Made with 💖 by Pejman Ebrahimi
85
  </div>
 
91
  gr.Markdown("""
92
  # FLUX.1 Schnell Marketing Assistant
93
 
94
+ This app uses the FLUX.1 Schnell model to generate high-quality images based on your prompt. Use it to create new logos, social media content, marketing advertisements, and more.
95
+ """, elem_id="title")
96
 
97
  with gr.Row():
 
98
  prompt = gr.Text(
99
  label="Prompt",
100
  show_label=False,
101
  max_lines=1,
102
  placeholder="Enter your prompt",
103
  container=False,
104
+ elem_id="prompt"
105
  )
106
 
107
  run_button = gr.Button("Run", scale=0)
108
 
109
+ result = gr.Image(label="Result", show_label=False, elem_id="result")
 
 
110
 
111
+ with gr.Accordion("Advanced Settings", open=False, elem_id="advanced-settings"):
112
  seed = gr.Slider(
113
  label="Seed",
114
  minimum=0,
 
120
  randomize_seed = gr.Checkbox(label="Randomize seed", value=True)
121
 
122
  with gr.Row():
 
123
  width = gr.Slider(
124
  label="Width",
125
  minimum=256,
 
137
  )
138
 
139
  with gr.Row():
 
140
  num_inference_steps = gr.Slider(
141
  label="Number of inference steps",
142
  minimum=1,