Spaces:
Running
Running
Display hours, minutes and seconds
Browse files
app.py
CHANGED
@@ -5,8 +5,7 @@ import time
|
|
5 |
import math
|
6 |
import random
|
7 |
import imageio
|
8 |
-
from PIL import Image
|
9 |
-
from PIL import ImageFilter
|
10 |
import torch
|
11 |
|
12 |
max_64_bit_int = 2**63 - 1
|
@@ -203,9 +202,14 @@ def uncrop(
|
|
203 |
mask_image = None
|
204 |
|
205 |
end = time.time()
|
|
|
|
|
|
|
|
|
|
|
206 |
return [
|
207 |
output_image,
|
208 |
-
"Start again to get a different result. The new image is " + str(output_width) + " pixels large and " + str(output_height) + " pixels high, so an image of " + str(output_width * output_height) + " pixels. The image have been generated in " + str(
|
209 |
input_image,
|
210 |
enlarged_image,
|
211 |
mask_image
|
@@ -221,21 +225,21 @@ with gr.Blocks() as interface:
|
|
221 |
gr.Markdown(
|
222 |
"""
|
223 |
<p style="text-align: center;"><b><big><big><big>Uncrop</big></big></big></b></p>
|
224 |
-
<p style="text-align: center;">Enlarges the point of view of your image, up to 1 million pixels, freely, without account, without watermark, which can be downloaded</p>
|
225 |
<br/>
|
226 |
<br/>
|
227 |
-
🚀 Powered by <i>SDXL 1.0</i> artificial intellingence
|
228 |
<br/>
|
229 |
<ul>
|
230 |
<li>To change the <b>view angle</b> of your image, I recommend to use <i>Zero123</i>,</li>
|
231 |
<li>To <b>upscale</b> your image, I recommend to use <i>Ilaria Upscaler</i>,</li>
|
232 |
<li>To <b>slightly change</b> your image, I recommend to use <i>Image-to-Image SDXL</i>,</li>
|
233 |
<li>To change <b>one detail</b> on your image, I recommend to use <i>Inpaint SDXL</i>,</li>
|
234 |
-
<li>To make a <b>tile</b> of your image, I recommend to use <i>Make My Image
|
235 |
-
<li>To modify <b>anything else</b> on your image, I recommend to use <i>Instruct Pix2Pix</i
|
236 |
</ul>
|
237 |
<br/>
|
238 |
-
🐌 Slow process... ~
|
239 |
<a href='https://huggingface.co/spaces/Fabrice-TIERCELIN/Uncrop?duplicate=true'><img src='https://img.shields.io/badge/-Duplicate%20Space-blue?labelColor=white&style=flat&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAP5JREFUOE+lk7FqAkEURY+ltunEgFXS2sZGIbXfEPdLlnxJyDdYB62sbbUKpLbVNhyYFzbrrA74YJlh9r079973psed0cvUD4A+4HoCjsA85X0Dfn/RBLBgBDxnQPfAEJgBY+A9gALA4tcbamSzS4xq4FOQAJgCDwV2CPKV8tZAJcAjMMkUe1vX+U+SMhfAJEHasQIWmXNN3abzDwHUrgcRGmYcgKe0bxrblHEB4E/pndMazNpSZGcsZdBlYJcEL9Afo75molJyM2FxmPgmgPqlWNLGfwZGG6UiyEvLzHYDmoPkDDiNm9JR9uboiONcBXrpY1qmgs21x1QwyZcpvxt9NS09PlsPAAAAAElFTkSuQmCC&logoWidth=14'></a>
|
240 |
<br/>
|
241 |
⚖️ You can use, modify and share the generated images but not for commercial uses.
|
|
|
5 |
import math
|
6 |
import random
|
7 |
import imageio
|
8 |
+
from PIL import (Image, ImageFilter)
|
|
|
9 |
import torch
|
10 |
|
11 |
max_64_bit_int = 2**63 - 1
|
|
|
202 |
mask_image = None
|
203 |
|
204 |
end = time.time()
|
205 |
+
secondes = int(end - start)
|
206 |
+
minutes = secondes // 60
|
207 |
+
secondes = secondes - (minutes * 60)
|
208 |
+
hours = minutes // 60
|
209 |
+
minutes = minutes - (hours * 60)
|
210 |
return [
|
211 |
output_image,
|
212 |
+
"Start again to get a different result. The new image is " + str(output_width) + " pixels large and " + str(output_height) + " pixels high, so an image of " + str(output_width * output_height) + " pixels. The image have been generated in " + str(hours) + " h, " + str(minutes) + " min, " + str(secondes) + " sec." + limitation,
|
213 |
input_image,
|
214 |
enlarged_image,
|
215 |
mask_image
|
|
|
225 |
gr.Markdown(
|
226 |
"""
|
227 |
<p style="text-align: center;"><b><big><big><big>Uncrop</big></big></big></b></p>
|
228 |
+
<p style="text-align: center;">Enlarges the point of view of your image, up to 1 million pixels, freely, without account, without watermark, without installation, which can be downloaded</p>
|
229 |
<br/>
|
230 |
<br/>
|
231 |
+
🚀 Powered by <i>SDXL 1.0</i> artificial intellingence. For illustration purpose, not information purpose. The new content is not based on real information but imagination.
|
232 |
<br/>
|
233 |
<ul>
|
234 |
<li>To change the <b>view angle</b> of your image, I recommend to use <i>Zero123</i>,</li>
|
235 |
<li>To <b>upscale</b> your image, I recommend to use <i>Ilaria Upscaler</i>,</li>
|
236 |
<li>To <b>slightly change</b> your image, I recommend to use <i>Image-to-Image SDXL</i>,</li>
|
237 |
<li>To change <b>one detail</b> on your image, I recommend to use <i>Inpaint SDXL</i>,</li>
|
238 |
+
<li>To make a <b>tile</b> of your image, I recommend to use <i>Make My Image Tile</i>,</li>
|
239 |
+
<li>To modify <b>anything else</b> on your image, I recommend to use <i>Instruct Pix2Pix</i>.</li>
|
240 |
</ul>
|
241 |
<br/>
|
242 |
+
🐌 Slow process... ~40 min.<br>You can duplicate this space on a free account, it works on CPU.<br/>
|
243 |
<a href='https://huggingface.co/spaces/Fabrice-TIERCELIN/Uncrop?duplicate=true'><img src='https://img.shields.io/badge/-Duplicate%20Space-blue?labelColor=white&style=flat&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAP5JREFUOE+lk7FqAkEURY+ltunEgFXS2sZGIbXfEPdLlnxJyDdYB62sbbUKpLbVNhyYFzbrrA74YJlh9r079973psed0cvUD4A+4HoCjsA85X0Dfn/RBLBgBDxnQPfAEJgBY+A9gALA4tcbamSzS4xq4FOQAJgCDwV2CPKV8tZAJcAjMMkUe1vX+U+SMhfAJEHasQIWmXNN3abzDwHUrgcRGmYcgKe0bxrblHEB4E/pndMazNpSZGcsZdBlYJcEL9Afo75molJyM2FxmPgmgPqlWNLGfwZGG6UiyEvLzHYDmoPkDDiNm9JR9uboiONcBXrpY1qmgs21x1QwyZcpvxt9NS09PlsPAAAAAElFTkSuQmCC&logoWidth=14'></a>
|
244 |
<br/>
|
245 |
⚖️ You can use, modify and share the generated images but not for commercial uses.
|