edgargg commited on
Commit
360261c
1 Parent(s): 9492d64

Update space.py

Browse files
Files changed (1) hide show
  1. space.py +35 -36
space.py CHANGED
@@ -138,41 +138,40 @@ def predict(
138
 
139
 
140
 
141
-
142
- demo.load(None, js=r"""function() {
143
- const refs = {};
144
- const user_fn_refs = {
145
- image_annotator: [], };
146
- requestAnimationFrame(() => {
147
-
148
- Object.entries(user_fn_refs).forEach(([key, refs]) => {
149
- if (refs.length > 0) {
150
- const el = document.querySelector(`.${key}-user-fn`);
151
- if (!el) return;
152
- refs.forEach(ref => {
153
- el.innerHTML = el.innerHTML.replace(
154
- new RegExp("\\b"+ref+"\\b", "g"),
155
- `<a href="#h-${ref.toLowerCase()}">${ref}</a>`
156
- );
157
- })
158
- }
159
- })
160
-
161
- Object.entries(refs).forEach(([key, refs]) => {
162
- if (refs.length > 0) {
163
- const el = document.querySelector(`.${key}`);
164
- if (!el) return;
165
- refs.forEach(ref => {
166
- el.innerHTML = el.innerHTML.replace(
167
- new RegExp("\\b"+ref+"\\b", "g"),
168
- `<a href="#h-${ref.toLowerCase()}">${ref}</a>`
169
- );
170
- })
171
- }
172
- })
173
- })
174
- }
175
-
176
- """)
177
 
178
  demo.launch()
 
138
 
139
 
140
 
141
+ demo.load()
142
+ # demo.load(None, js=r"""function() {
143
+ # const refs = {};
144
+ # const user_fn_refs = {
145
+ # image_annotator: [], };
146
+ # requestAnimationFrame(() => {
147
+
148
+ # Object.entries(user_fn_refs).forEach(([key, refs]) => {
149
+ # if (refs.length > 0) {
150
+ # const el = document.querySelector(`.${key}-user-fn`);
151
+ # if (!el) return;
152
+ # refs.forEach(ref => {
153
+ # el.innerHTML = el.innerHTML.replace(
154
+ # new RegExp("\\b"+ref+"\\b", "g"),
155
+ # `<a href="#h-${ref.toLowerCase()}">${ref}</a>`
156
+ # );
157
+ # })
158
+ # }
159
+ # })
160
+
161
+ # Object.entries(refs).forEach(([key, refs]) => {
162
+ # if (refs.length > 0) {
163
+ # const el = document.querySelector(`.${key}`);
164
+ # if (!el) return;
165
+ # refs.forEach(ref => {
166
+ # el.innerHTML = el.innerHTML.replace(
167
+ # new RegExp("\\b"+ref+"\\b", "g"),
168
+ # `<a href="#h-${ref.toLowerCase()}">${ref}</a>`
169
+ # );
170
+ # })
171
+ # }
172
+ # })
173
+ # })
174
+ # }
175
+ # """)
 
176
 
177
  demo.launch()