Spaces:
Runtime error
Runtime error
Tyler Lastovich
commited on
Commit
·
263c757
1
Parent(s):
73c177a
Adding labels to image directly
Browse files
app.py
CHANGED
@@ -123,7 +123,13 @@ def prompt_to_layout(user_prompt, intensity, fpath=None):
|
|
123 |
|
124 |
html = '<img class="labels" src="images/labels.png" />'
|
125 |
|
126 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
127 |
|
128 |
|
129 |
# Gradio App
|
|
|
123 |
|
124 |
html = '<img class="labels" src="images/labels.png" />'
|
125 |
|
126 |
+
legend = Image.open("images/labels.png")
|
127 |
+
|
128 |
+
im = np.array(im)
|
129 |
+
im[:40, :] = np.array(legend)
|
130 |
+
im = Image.fromarray(im)
|
131 |
+
|
132 |
+
return im
|
133 |
|
134 |
|
135 |
# Gradio App
|