jozee commited on
Commit
610b26c
·
verified ·
1 Parent(s): 0a599f7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +31 -18
app.py CHANGED
@@ -1,23 +1,36 @@
1
- import gradio as gr
2
  import spaces
3
- import torch
4
- from diffusers import AutoencoderKL, TCDScheduler
5
- from diffusers.models.model_loading_utils import load_state_dict
6
  from gradio_imageslider import ImageSlider
7
- from huggingface_hub import hf_hub_download
 
 
 
 
 
 
 
 
 
 
 
 
 
8
 
9
  with gr.Blocks() as demo:
10
- with gr.Column():
11
- with gr.Row():
12
- with gr.Column():
13
- input_image = gr.Image(
14
- type='pil',
15
- label="Input Image"
16
- )
17
- with gr.Column():
18
- result = ImageSlider(
19
- interactive=False,
20
- label="Generated Image",
21
- )
 
 
 
22
 
23
- demo.queue(max_size=12).launch(share=False)
 
 
1
  import spaces
2
+ import gradio as gr
 
 
3
  from gradio_imageslider import ImageSlider
4
+ # from PIL import Image
5
+ import numpy as np
6
+ import torch
7
+
8
+ title = """<h1 align="center">AuraSR</h1>
9
+ <p><center>Upscales your images to x4</center></p>
10
+ <p><center>
11
+ <a href="https://huggingface.co/fal/AuraSR-v2" target="_blank">[AuraSR-v2]</a>
12
+ <a href="https://blog.fal.ai/introducing-aurasr-an-open-reproduction-of-the-gigagan-upscaler-2/" target="_blank">[Blog Post]</a>
13
+ <a href="https://huggingface.co/fal-ai/AuraSR" target="_blank">[v1 Model Page]</a>
14
+ </center></p>
15
+ <br/>
16
+ <p>This is an open reproduction of the GigaGAN Upscaler from fal.ai</p>
17
+ """
18
 
19
  with gr.Blocks() as demo:
20
+
21
+ gr.HTML(title)
22
+
23
+ with gr.Row():
24
+ with gr.Column(scale=1):
25
+ input_image = gr.Image(label="Input Image", type="numpy")
26
+ process_btn = gr.Button(value="Upscale Image", variant = "primary")
27
+ with gr.Column(scale=1):
28
+ output_slider = ImageSlider(label="Before / After", type="numpy")
29
+
30
+ process_btn.click(
31
+ fn=process_image,
32
+ inputs=[input_image],
33
+ outputs=output_slider
34
+ )
35
 
36
+ demo.launch(debug=True)