Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -44,45 +44,15 @@ from gradio_seg2image import create_demo as create_demo_seg
|
|
44 |
from model import Model
|
45 |
|
46 |
MAX_IMAGES = 1
|
47 |
-
DESCRIPTION = '''# ControlNet
|
48 |
|
49 |
-
|
50 |
|
51 |
-
If you are interested in trying out other base models, check out [this Space](https://huggingface.co/spaces/hysts/ControlNet-with-other-models) as well.
|
52 |
-
'''
|
53 |
-
if (SPACE_ID := os.getenv('SPACE_ID')) is not None:
|
54 |
-
DESCRIPTION += f'''<p>For faster inference without waiting in queue, you may duplicate the space and upgrade to GPU in settings.<br/>
|
55 |
-
<a href="https://huggingface.co/spaces/{SPACE_ID}?duplicate=true">
|
56 |
-
<img style="margin-top: 0em; margin-bottom: 0em" src="https://bit.ly/3gLdBN6" alt="Duplicate Space"></a>
|
57 |
-
<p/>
|
58 |
'''
|
59 |
|
60 |
model = Model()
|
61 |
|
62 |
with gr.Blocks(css='style.css') as demo:
|
63 |
-
|
64 |
-
with gr.Tabs():
|
65 |
-
with gr.TabItem('Canny'):
|
66 |
-
create_demo_canny(model.process_canny, max_images=MAX_IMAGES)
|
67 |
-
with gr.TabItem('Hough'):
|
68 |
-
create_demo_hough(model.process_hough, max_images=MAX_IMAGES)
|
69 |
-
with gr.TabItem('HED'):
|
70 |
-
create_demo_hed(model.process_hed, max_images=MAX_IMAGES)
|
71 |
-
with gr.TabItem('Scribble'):
|
72 |
-
create_demo_scribble(model.process_scribble, max_images=MAX_IMAGES)
|
73 |
-
with gr.TabItem('Scribble Interactive'):
|
74 |
-
create_demo_scribble_interactive(
|
75 |
-
model.process_scribble_interactive, max_images=MAX_IMAGES)
|
76 |
-
with gr.TabItem('Fake Scribble'):
|
77 |
-
create_demo_fake_scribble(model.process_fake_scribble,
|
78 |
-
max_images=MAX_IMAGES)
|
79 |
-
with gr.TabItem('Pose'):
|
80 |
-
create_demo_pose(model.process_pose, max_images=MAX_IMAGES)
|
81 |
-
with gr.TabItem('Segmentation'):
|
82 |
-
create_demo_seg(model.process_seg, max_images=MAX_IMAGES)
|
83 |
-
with gr.TabItem('Depth'):
|
84 |
-
create_demo_depth(model.process_depth, max_images=MAX_IMAGES)
|
85 |
-
with gr.TabItem('Normal map'):
|
86 |
-
create_demo_normal(model.process_normal, max_images=MAX_IMAGES)
|
87 |
|
88 |
demo.queue(api_open=False).launch()
|
|
|
44 |
from model import Model
|
45 |
|
46 |
MAX_IMAGES = 1
|
47 |
+
DESCRIPTION = '''# Bake-a-Cake, powered by ControlNet"
|
48 |
|
49 |
+
Put a picture of anything, and ControlNet will turn it into a hyperrealistic cake:
|
50 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
'''
|
52 |
|
53 |
model = Model()
|
54 |
|
55 |
with gr.Blocks(css='style.css') as demo:
|
56 |
+
create_demo_canny(model.process_canny, max_images=MAX_IMAGES)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
|
58 |
demo.queue(api_open=False).launch()
|