multimodalart HF Staff commited on
Commit
638bce8
·
verified ·
1 Parent(s): 97eaaa1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -11
app.py CHANGED
@@ -393,13 +393,10 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
393
  gr.Markdown(
394
  """
395
  # The Annotated Discrete Diffusion Models
396
- This Gradio demo provides an interactive implementation of the character-level discrete diffusion model.
397
- The model starts with random characters (noise) and iteratively denoises them to generate coherent text.
398
 
399
- **How to use:**
400
- 1. Adjust the **Denoising Steps** and **Replay Speed**.
401
- 2. Click **Generate**. The model will first compute all steps (see progress bar).
402
- 3. After computation, the app will replay the denoising process in the textbox below.
403
  """
404
  )
405
 
@@ -415,7 +412,7 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
415
  speed_slider = gr.Slider(
416
  minimum=1,
417
  maximum=20,
418
- value=5,
419
  step=1,
420
  label="Replay Speed",
421
  info="Controls the speed of the animation after generation.",
@@ -432,12 +429,8 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
432
  placeholder="Generation will appear here..."
433
  )
434
 
435
- # Hidden state to store the diffusion frames
436
  diffusion_frames_state = gr.State([])
437
 
438
- # Chain the events:
439
- # 1. Click button -> run fast generation, store frames in state
440
- # 2. After generation -> run slow replay from the state
441
  generate_event = generate_button.click(
442
  fn=generate_text,
443
  inputs=[steps_slider],
 
393
  gr.Markdown(
394
  """
395
  # The Annotated Discrete Diffusion Models
 
 
396
 
397
+ ## Tiny 7.23M parameters Shakespeare character diffusion model by [Ashwani Kumar](https://x.com/ash_at_tt/status/1977376958859092250)
398
+
399
+ [GitHub](https://github.com/ash80/diffusion-gpt), [Colab](https://colab.research.google.com/github/ash80/diffusion-gpt/blob/master/The_Annotated_Discrete_Diffusion_Models.ipynb)
 
400
  """
401
  )
402
 
 
412
  speed_slider = gr.Slider(
413
  minimum=1,
414
  maximum=20,
415
+ value=10,
416
  step=1,
417
  label="Replay Speed",
418
  info="Controls the speed of the animation after generation.",
 
429
  placeholder="Generation will appear here..."
430
  )
431
 
 
432
  diffusion_frames_state = gr.State([])
433
 
 
 
 
434
  generate_event = generate_button.click(
435
  fn=generate_text,
436
  inputs=[steps_slider],