multimodalart HF Staff commited on
Commit
7845e13
·
verified ·
1 Parent(s): 232b133

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -18,7 +18,7 @@ pipe = CosmosTextToImagePipeline.from_pretrained(model_id, torch_dtype=torch.bfl
18
  pipe.to("cuda")
19
 
20
  @spaces.GPU
21
- def generate_image(prompt, negative_prompt, seed, randomize_seed):
22
  """
23
  Generates an image based on the provided prompt and negative prompt.
24
  Randomizes the seed if randomize_seed is True, otherwise uses the provided seed.
@@ -39,7 +39,7 @@ def generate_image(prompt, negative_prompt, seed, randomize_seed):
39
  with gr.Blocks() as demo:
40
  gr.Markdown(
41
  """
42
- # Cosmos Text-to-Image Generator
43
  Enter a detailed prompt to generate an image using the Cosmos model.
44
  You can also provide a negative prompt to guide the generation away from certain elements.
45
  """
 
18
  pipe.to("cuda")
19
 
20
  @spaces.GPU
21
+ def generate_image(prompt, negative_prompt, seed, randomize_seed, progress=gr.Progress(track_tqdm=True)):
22
  """
23
  Generates an image based on the provided prompt and negative prompt.
24
  Randomizes the seed if randomize_seed is True, otherwise uses the provided seed.
 
39
  with gr.Blocks() as demo:
40
  gr.Markdown(
41
  """
42
+ # Cosmos Predict-2 14B Text-to-Image Generator
43
  Enter a detailed prompt to generate an image using the Cosmos model.
44
  You can also provide a negative prompt to guide the generation away from certain elements.
45
  """