Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -62,11 +62,8 @@ def nogan(input_img):
|
|
62 |
|
63 |
return output_image
|
64 |
|
65 |
-
title = "
|
66 |
-
description = """
|
67 |
-
Gradio demo for ToonClip, a UNet++ network with MobileNet v3 backbone optimized for mobile frameworks and trained with VGG Perceptual Feature Loss using PyTorch Lighting.
|
68 |
-
To use it, simply upload an image with a face or choose an example from the list below.
|
69 |
-
"""
|
70 |
article = """
|
71 |
<style>
|
72 |
.boxes{
|
@@ -82,11 +79,8 @@ article = """
|
|
82 |
}
|
83 |
</style>
|
84 |
<p style='text-align: center'>The \"ToonClip\" model was trained by <a href='https://twitter.com/JacopoMangia' target='_blank'>Jacopo Mangiavacchi</a> and available at <a href='https://github.com/jacopomangiavacchi/ComicsHeroMobileUNet' target='_blank'>Github Repo ComicsHeroMobileUNet</a></p>
|
85 |
-
<p style='text-align: center'>The \"Comics Hero dataset\" used to train this model was produced by <a href='https://linktr.ee/Norod78' target='_blank'>Doron Adler</a> and available at <a href='https://github.com/Norod/U-2-Net-StyleTransfer' target='_blank'>Github Repo Comics hero U2Net</a></p>
|
86 |
-
<p style='text-align: center'>The \"ToonClip\" iOS mobile app using a CoreML version of this model is available on Apple App Store at <a href='https://apps.apple.com/us/app/toonclip/id1536285338' target='_blank'>ToonClip</a></p>
|
87 |
-
<p style='text-align: center'>Blog post on <a href='https://medium.com/@JMangia/optimize-a-face-to-cartoon-style-transfer-model-trained-quickly-on-small-style-dataset-and-50594126e792' target='_blank'>Medium</a></p>
|
88 |
<br>
|
89 |
-
<p style='text-align: center'>Example images
|
90 |
<p>
|
91 |
<div id='mainDiv'>
|
92 |
<div id='divOne' class='boxes'>
|
@@ -152,6 +146,7 @@ article = """
|
|
152 |
</div>
|
153 |
</p>
|
154 |
"""
|
|
|
155 |
examples=[['i01.jpeg'], ['i02.jpeg'], ['i03.jpeg'], ['i04.jpeg'], ['i05.jpeg'], ['i06.jpeg'], ['i07.jpeg'], ['i08.jpeg'], ['i09.jpeg'], ['i10.jpeg']]
|
156 |
|
157 |
iface = gr.Interface(
|
@@ -163,4 +158,4 @@ iface = gr.Interface(
|
|
163 |
article=article,
|
164 |
examples=examples)
|
165 |
|
166 |
-
iface.launch()
|
|
|
62 |
|
63 |
return output_image
|
64 |
|
65 |
+
title = "Zoom, CLIP, Toon"
|
66 |
+
description = """Image to Toon Using AI"""
|
|
|
|
|
|
|
67 |
article = """
|
68 |
<style>
|
69 |
.boxes{
|
|
|
79 |
}
|
80 |
</style>
|
81 |
<p style='text-align: center'>The \"ToonClip\" model was trained by <a href='https://twitter.com/JacopoMangia' target='_blank'>Jacopo Mangiavacchi</a> and available at <a href='https://github.com/jacopomangiavacchi/ComicsHeroMobileUNet' target='_blank'>Github Repo ComicsHeroMobileUNet</a></p>
|
|
|
|
|
|
|
82 |
<br>
|
83 |
+
<p style='text-align: center'>Example images: </p>
|
84 |
<p>
|
85 |
<div id='mainDiv'>
|
86 |
<div id='divOne' class='boxes'>
|
|
|
146 |
</div>
|
147 |
</p>
|
148 |
"""
|
149 |
+
|
150 |
examples=[['i01.jpeg'], ['i02.jpeg'], ['i03.jpeg'], ['i04.jpeg'], ['i05.jpeg'], ['i06.jpeg'], ['i07.jpeg'], ['i08.jpeg'], ['i09.jpeg'], ['i10.jpeg']]
|
151 |
|
152 |
iface = gr.Interface(
|
|
|
158 |
article=article,
|
159 |
examples=examples)
|
160 |
|
161 |
+
iface.launch()
|