piyk commited on
Commit
b1f75f5
·
verified ·
1 Parent(s): b7c8482

Update src/app.py

Browse files
Files changed (1) hide show
  1. src/app.py +12 -27
src/app.py CHANGED
@@ -20,29 +20,7 @@ from refiners.foundationals.latent_diffusion import Solver, solvers
20
 
21
  from enhancer import ESRGANUpscaler, ESRGANUpscalerCheckpoints
22
 
23
- TITLE = """
24
- <center>
25
-
26
- <h1 style="font-size: 1.5rem; margin-bottom: 0.5rem;">
27
- Image Enhancer Powered By Refiners
28
- </h1>
29
-
30
- <div style="display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin-bottom: 0.5rem; font-size: 1.25rem; flex-wrap: wrap;">
31
- <a href="https://blog.finegrain.ai/posts/reproducing-clarity-upscaler/" target="_blank">[blog post]</a>
32
- <a href="https://github.com/finegrain-ai/refiners" target="_blank">[refiners]</a>
33
- <a href="https://github.com/philz1337x/clarity-upscaler" target="_blank">[clarity-upscaler]</a>
34
- <a href="https://finegrain.ai/" target="_blank">[finegrain]</a>
35
- </div>
36
-
37
- <p style="margin: 0;">
38
- If you enjoyed this space, please consider starring Refiners on GitHub!
39
- <a href="https://github.com/finegrain-ai/refiners" target="_blank">
40
- <img src="https://img.shields.io/github/stars/finegrain-ai/refiners?style=social" style="display: inline; vertical-align: middle;" />
41
- </a>
42
- </p>
43
-
44
- </center>
45
- """
46
 
47
  CHECKPOINTS = ESRGANUpscalerCheckpoints(
48
  unet=Path(
@@ -158,10 +136,17 @@ def process(
158
 
159
  return (input_image, enhanced_image)
160
 
161
-
162
- with gr.Blocks() as demo:
163
- gr.HTML(TITLE)
164
-
 
 
 
 
 
 
 
165
  with gr.Row():
166
  with gr.Column():
167
  input_image = gr.Image(type="pil", label="Input Image")
 
20
 
21
  from enhancer import ESRGANUpscaler, ESRGANUpscalerCheckpoints
22
 
23
+ TITLE = """# Image Enhancer Powered By Refiners"""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
 
25
  CHECKPOINTS = ESRGANUpscalerCheckpoints(
26
  unet=Path(
 
136
 
137
  return (input_image, enhanced_image)
138
 
139
+ css = '''
140
+ .gradio-container{max-width: 100% !important}
141
+ h1{text-align:center}
142
+ '''
143
+ with gr.Blocks(css=css) as demo:
144
+ gr.Markdown(TITLE)
145
+ gr.Markdown(
146
+ """
147
+ Made by csit.udru.ac.th for non-commercial license
148
+ """
149
+ )
150
  with gr.Row():
151
  with gr.Column():
152
  input_image = gr.Image(type="pil", label="Input Image")