NihalGazi commited on
Commit
b85ac26
·
verified ·
1 Parent(s): 375c02e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +69 -21
app.py CHANGED
@@ -6,6 +6,37 @@ from PIL import Image
6
  from io import BytesIO
7
  from gradio_client import Client
8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  # more servers coming soon...
10
 
11
 
@@ -13,8 +44,10 @@ SERVER_NAMES = {
13
  "google_us": "Google US Server",
14
  "azure_lite": "Azure Lite Supercomputer Server",
15
  "artemis" : "Artemis GPU Super cluster",
 
16
  "nsfw_core" : "NSFW-Core: Uncensored Server",
17
  "nsfw_core_2" : "NSFW-Core: Uncensored Server 2",
 
18
 
19
  }
20
 
@@ -23,8 +56,10 @@ SERVER_SOCKETS = {
23
  "google_us": None,
24
  "azure_lite": "FLUX-Pro-SERVER1",
25
  "artemis" : "FLUX-Pro-Artemis-GPU",
 
26
  "nsfw_core": "FLUX-Pro-NSFW-LocalCoreProcessor",
27
  "nsfw_core_2" : "FLUX-Pro-NSFW-LocalCoreProcessor-v2",
 
28
 
29
  }
30
 
@@ -101,23 +136,11 @@ def generate_image(prompt, width, height, seed, randomize, server_choice):
101
 
102
  # ─── GRADIO INTERFACE ─────────────────────────────────────────────────────
103
 
104
- iface = gr.Interface(
105
- fn=generate_image,
106
- inputs=[
107
- gr.Textbox(label="Prompt", placeholder="Enter your image prompt…"),
108
- gr.Slider(512, 1280, step=16, value=1280, label="Width"),
109
- gr.Slider(512, 1280, step=16, value=1280, label="Height"),
110
- gr.Number(label="Seed", value=0),
111
- gr.Checkbox(label="Randomize Seed", value=True),
112
- gr.Dropdown(
113
- label="Server",
114
- choices=list(SERVER_NAMES.values()),
115
- value=SERVER_NAMES["google_us"]
116
- ),
117
- ],
118
- outputs=gr.Image(type="pil"),
119
- title="Unlimited FLUX‑Pro",
120
- description = """
121
  **Enter a prompt and tweak your settings:**
122
  - **Width & Height** – choose your canvas size
123
  - **Seed** – pick a number or check **Randomize Seed**
@@ -125,6 +148,7 @@ iface = gr.Interface(
125
  - **Google US Server**
126
  - **Azure Lite Supercomputer Server**
127
  - **Artemis GPU Super cluster**
 
128
  - **NSFW‑Core: Uncensored Servers** (for explicit content; use responsibly)
129
  - **Suggestions** – have ideas? I’m open to them!
130
 
@@ -132,7 +156,7 @@ iface = gr.Interface(
132
  The **NSFW‑Core** server can generate adult‑only content. You must be of legal age in your jurisdiction and comply with all local laws and platform policies. Developer is not liable for misuse.
133
 
134
 
135
- > ⚡ 2 NSFW Servers available
136
 
137
 
138
  Click **Generate** and enjoy unlimited AI art!
@@ -141,7 +165,31 @@ Click **Generate** and enjoy unlimited AI art!
141
  • Instagram: [@nihal_gazi_io](https://www.instagram.com/nihal_gazi_io/)
142
  • Discord: nihal_gazi_io
143
  """
144
- )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
145
 
146
- if __name__ == "__main__":
147
- iface.launch()
 
6
  from io import BytesIO
7
  from gradio_client import Client
8
 
9
+
10
+ sponsor_html = """
11
+ <div style="display:flex; padding: 0em; justify-content: center; gap: 1em; border-radius: 2em;">
12
+ <img src="https://static-00.iconduck.com/assets.00/google-cloud-icon-2048x1288-h9qynww8.png"
13
+ style="height:1em; width:auto; object-fit:contain;"
14
+ title="Google Cloud for Startups"/>
15
+ <img src="https://upload.wikimedia.org/wikipedia/commons/thumb/9/93/Amazon_Web_Services_Logo.svg/2560px-Amazon_Web_Services_Logo.svg.png"
16
+ style="height:1em; width:auto; object-fit:contain;"
17
+ title="AWS Activate"/>
18
+ <img src="https://ageyetech.com/wp-content/uploads/2020/07/AgEye_nvidia_inception_logo_new.png"
19
+ style="height:1em; width:auto; object-fit:contain;"
20
+ title="NVIDIA Inception"/>
21
+ <img src="https://azurecomcdn.azureedge.net/cvt-8310f955fa0c7812bd316a20d46a917e5b94170e9e9da481ca3045acae446bb5/svg/logo.svg"
22
+ style="height:1em; width:auto; object-fit:contain;"
23
+ title="Azure for Startups"/>
24
+ <img src="https://upload.wikimedia.org/wikipedia/commons/thumb/4/4b/Cloudflare_Logo.svg/2560px-Cloudflare_Logo.svg.png"
25
+ style="height:1em; width:auto; object-fit:contain;"
26
+ title="Cloudflare"/>
27
+ <img src="https://scaleway.com/cdn-cgi/image/width=640/https://www-uploads.scaleway.com/Scaleway_3_D_Logo_57e7fb833f.png"
28
+ style="height:1em; width:auto; object-fit:contain;"
29
+ title="Scaleway"/>
30
+ <img src="https://cdn.prod.website-files.com/63e26df0d6659968e46142f7/63e27b40e661321d5278519b_logotype-bb8cd083.svg"
31
+ style="height:1em; width:auto; object-fit:contain;"
32
+ title="Modal"/>
33
+ <img src="https://pollinations.ai/favicon.ico"
34
+ style="height:1em; width:auto; object-fit:contain;"
35
+ title="Pollination.ai"/>
36
+ </div>
37
+ """
38
+
39
+
40
  # more servers coming soon...
41
 
42
 
 
44
  "google_us": "Google US Server",
45
  "azure_lite": "Azure Lite Supercomputer Server",
46
  "artemis" : "Artemis GPU Super cluster",
47
+ "nb_dr" : "NebulaDrive Tensor Server",
48
  "nsfw_core" : "NSFW-Core: Uncensored Server",
49
  "nsfw_core_2" : "NSFW-Core: Uncensored Server 2",
50
+ "nsfw_core_3" : "NSFW-Core: Uncensored Server 3",
51
 
52
  }
53
 
 
56
  "google_us": None,
57
  "azure_lite": "FLUX-Pro-SERVER1",
58
  "artemis" : "FLUX-Pro-Artemis-GPU",
59
+ "nb_dr" : "FLUX-Pro-NEBULADRIVE",
60
  "nsfw_core": "FLUX-Pro-NSFW-LocalCoreProcessor",
61
  "nsfw_core_2" : "FLUX-Pro-NSFW-LocalCoreProcessor-v2",
62
+ "nsfw_core_3" : "FLUX-Pro-NSFW-LocalCoreProcessor-v3",
63
 
64
  }
65
 
 
136
 
137
  # ─── GRADIO INTERFACE ─────────────────────────────────────────────────────
138
 
139
+ with gr.Blocks(theme=gr.themes.Default()) as demo:
140
+ gr.Markdown(
141
+ """
142
+ # Unlimited FLUX-Pro
143
+
 
 
 
 
 
 
 
 
 
 
 
 
144
  **Enter a prompt and tweak your settings:**
145
  - **Width & Height** – choose your canvas size
146
  - **Seed** – pick a number or check **Randomize Seed**
 
148
  - **Google US Server**
149
  - **Azure Lite Supercomputer Server**
150
  - **Artemis GPU Super cluster**
151
+ - **NebulaDrive Tensor Server**
152
  - **NSFW‑Core: Uncensored Servers** (for explicit content; use responsibly)
153
  - **Suggestions** – have ideas? I’m open to them!
154
 
 
156
  The **NSFW‑Core** server can generate adult‑only content. You must be of legal age in your jurisdiction and comply with all local laws and platform policies. Developer is not liable for misuse.
157
 
158
 
159
+ > ⚡ 3 NSFW Servers available
160
 
161
 
162
  Click **Generate** and enjoy unlimited AI art!
 
165
  • Instagram: [@nihal_gazi_io](https://www.instagram.com/nihal_gazi_io/)
166
  • Discord: nihal_gazi_io
167
  """
168
+ )
169
+ # Inputs / Outputs as before
170
+
171
+ prompt = gr.Textbox(label="Prompt", placeholder="Enter your image prompt…", lines=4)
172
+ width = gr.Slider(512, 1280, step=16, value=1280, label="Width")
173
+ height = gr.Slider(512, 1280, step=16, value=1280, label="Height")
174
+ seed = gr.Number(label="Seed", value=0)
175
+ rand = gr.Checkbox(label="Randomize Seed", value=True)
176
+ server = gr.Dropdown(label="Server", choices=list(SERVER_NAMES.values()),
177
+ value=list(SERVER_NAMES.values())[0])
178
+
179
+
180
+ generate_btn = gr.Button("Generate")
181
+
182
+ output = gr.Image(type="pil")
183
+
184
+ generate_btn.click(
185
+ generate_image,
186
+ inputs=[prompt, width, height, seed, rand, server],
187
+ outputs=output
188
+ )
189
+
190
+
191
+
192
+ # Now inject your raw HTML sponsor wall
193
+ gr.HTML(sponsor_html)
194
 
195
+ demo.launch()