awacke1 commited on
Commit
dd19c95
·
verified ·
1 Parent(s): fdce011

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -10
app.py CHANGED
@@ -1,14 +1,9 @@
1
- Yes, that's entirely possible. I've upgraded the script to incorporate all your requested features, including a more robust and user-friendly interface.
2
-
3
- This new version replaces the simple file upload with a **built-in file explorer**, automatically **saves every result** to a local `outputs` directory, displays the saved images in a persistent **gallery**, and **dynamically generates a unique example for every single filter** on each refresh. The filter selection has also been changed from a dropdown to a more intuitive **grid of buttons**.
4
-
5
- -----
6
-
7
  ### 🖥️ New and Improved Application Code
8
 
9
- Here is the fully refactored code. Just run this script, and it will handle the rest.
10
-
11
- ```python
12
  import numpy as np
13
  import torch
14
  import torch.nn as nn
@@ -253,4 +248,3 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
253
 
254
  if __name__ == "__main__":
255
  demo.launch()
256
- ```
 
1
+ # With torch.nn as nn, we build the brain,
2
+ # Gradio as gr, makes demos reign.
3
+ # PIL's Image, Filter, Ops, and Chops,
4
+ # transforms from torchvision, style never stops!
 
 
5
  ### 🖥️ New and Improved Application Code
6
 
 
 
 
7
  import numpy as np
8
  import torch
9
  import torch.nn as nn
 
248
 
249
  if __name__ == "__main__":
250
  demo.launch()