craftgamesnetwork commited on
Commit
ce8af91
Β·
verified Β·
1 Parent(s): 7e82895

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -14
app.py CHANGED
@@ -19,7 +19,6 @@ if not torch.cuda.is_available():
19
  DESCRIPTION += "\n<p>⚠️ This space is running on the CPU. This demo doesn't work on CPU 😞! Run on a GPU by duplicating this space or test our website for free and unlimited by <a href='https://squaadai.com'>clicking here</a>, which provides these and more options.</p>"
20
 
21
  MAX_SEED = np.iinfo(np.int32).max
22
- CACHE_EXAMPLES = torch.cuda.is_available() and os.getenv("CACHE_EXAMPLES") == "1"
23
  MAX_IMAGE_SIZE = int(os.getenv("MAX_IMAGE_SIZE", "1824"))
24
  USE_TORCH_COMPILE = os.getenv("USE_TORCH_COMPILE") == "1"
25
  ENABLE_CPU_OFFLOAD = os.getenv("ENABLE_CPU_OFFLOAD") == "1"
@@ -131,11 +130,6 @@ def generate(
131
  ).images[0]
132
  return images
133
 
134
- examples = [
135
- "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k",
136
- "An astronaut riding a green horse",
137
- ]
138
-
139
  with gr.Blocks(theme=gr.themes.Soft(), css="style.css") as demo:
140
  gr.HTML(
141
  "<p><center>πŸ“™ For any additional support, join our <a href='https://discord.gg/JprjXpjt9K'>Discord</a></center></p>"
@@ -243,14 +237,6 @@ with gr.Blocks(theme=gr.themes.Soft(), css="style.css") as demo:
243
  value=0.7,
244
  )
245
 
246
- gr.Examples(
247
- examples=examples,
248
- inputs=prompt,
249
- outputs=result,
250
- fn=generate,
251
- cache_examples=CACHE_EXAMPLES,
252
- )
253
-
254
  use_negative_prompt.change(
255
  fn=lambda x: gr.update(visible=x),
256
  inputs=use_negative_prompt,
 
19
  DESCRIPTION += "\n<p>⚠️ This space is running on the CPU. This demo doesn't work on CPU 😞! Run on a GPU by duplicating this space or test our website for free and unlimited by <a href='https://squaadai.com'>clicking here</a>, which provides these and more options.</p>"
20
 
21
  MAX_SEED = np.iinfo(np.int32).max
 
22
  MAX_IMAGE_SIZE = int(os.getenv("MAX_IMAGE_SIZE", "1824"))
23
  USE_TORCH_COMPILE = os.getenv("USE_TORCH_COMPILE") == "1"
24
  ENABLE_CPU_OFFLOAD = os.getenv("ENABLE_CPU_OFFLOAD") == "1"
 
130
  ).images[0]
131
  return images
132
 
 
 
 
 
 
133
  with gr.Blocks(theme=gr.themes.Soft(), css="style.css") as demo:
134
  gr.HTML(
135
  "<p><center>πŸ“™ For any additional support, join our <a href='https://discord.gg/JprjXpjt9K'>Discord</a></center></p>"
 
237
  value=0.7,
238
  )
239
 
 
 
 
 
 
 
 
 
240
  use_negative_prompt.change(
241
  fn=lambda x: gr.update(visible=x),
242
  inputs=use_negative_prompt,