Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -1,23 +1,36 @@
|
|
1 |
-
import gradio as gr
|
2 |
import spaces
|
3 |
-
import
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
|
9 |
with gr.Blocks() as demo:
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
|
|
|
|
|
|
22 |
|
23 |
-
demo.
|
|
|
|
|
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)
|