Anjith George commited on
Commit
7b9ac1c
·
1 Parent(s): fc96fb2

[Fix] Render

Browse files
Files changed (1) hide show
  1. app.py +17 -11
app.py CHANGED
@@ -150,9 +150,10 @@ a:hover {{color:{PRIMARY_DARK}}}
150
  margin-top:2rem;
151
  }}
152
  #cite-wrapper code {{
153
- font-family:SFMono-Regular,Consolas,monospace;
154
- font-size:.84rem;
155
- white-space:pre-wrap;
 
156
  }}
157
  #copy-btn {{
158
  position:absolute;
@@ -230,7 +231,7 @@ HERO_HTML = f"""
230
  <a href="https://publications.idiap.ch/attachments/papers/2024/George_IEEETBIOM_2024.pdf">Paper</a>&nbsp;•&nbsp;
231
  <a href="https://arxiv.org/abs/2307.01838">arXiv</a>&nbsp;•&nbsp;
232
  <a href="https://gitlab.idiap.ch/bob/bob.paper.tbiom2023_edgeface">Code</a>&nbsp;•&nbsp;
233
- <img src="https://hitscounter.dev/api/hit?url=https%3A%2F%2Fhuggingface.co%2Fspaces%2idiap%2FEdgeFace&label=Visitors&icon=award-fill&color=%23dc3545" alt="Visitors">
234
  </div>
235
  </div>
236
  """
@@ -241,12 +242,12 @@ CITATION_HTML = """
241
  navigator.clipboard.writeText(document.getElementById('bibtex').innerText)
242
  .then(()=>{this.textContent='✔︎';setTimeout(()=>this.textContent='Copy',1500);});
243
  ">Copy</button>
244
- <code id="bibtex">@article{{edgeface,
245
  title = {{EdgeFace: Efficient Face Recognition Model for Edge Devices}},
246
- author = {{George, A. and Ecabert, C. and Otraoshi Shahreza, H. and Kotwal, K. and Marcel, S.}},
247
  journal= {{IEEE Trans. Biometrics, Behavior, & Identity Science}},
248
  year = {{2024}}
249
- }}</code>
250
  </div>
251
  """
252
 
@@ -264,10 +265,15 @@ with gr.Blocks(css=CSS, title="EdgeFace Demo") as demo:
264
  label="Image B", object_fit="contain")
265
 
266
  with gr.Row():
267
- img_a = gr.Image(type="numpy", height=300, label="Image A",
268
- elem_classes="preview")
269
- img_b = gr.Image(type="numpy", height=300, label="Image B",
270
- elem_classes="preview")
 
 
 
 
 
271
 
272
  def _fill(evt: gr.SelectData):
273
  return _as_rgb(PRELOADED[evt.index]) if evt.index is not None else None
 
150
  margin-top:2rem;
151
  }}
152
  #cite-wrapper code {{
153
+ font-family: SFMono-Regular, Consolas, monospace;
154
+ font-size: .84rem;
155
+ white-space: pre-wrap;
156
+ color: #0F172A;
157
  }}
158
  #copy-btn {{
159
  position:absolute;
 
231
  <a href="https://publications.idiap.ch/attachments/papers/2024/George_IEEETBIOM_2024.pdf">Paper</a>&nbsp;•&nbsp;
232
  <a href="https://arxiv.org/abs/2307.01838">arXiv</a>&nbsp;•&nbsp;
233
  <a href="https://gitlab.idiap.ch/bob/bob.paper.tbiom2023_edgeface">Code</a>&nbsp;•&nbsp;
234
+ <img src="https://hitscounter.dev/api/hit?url=https%3A%2F%2Fhuggingface.co%2Fspaces%2Fanjith2006%2FEdgeFace&label=Visitors&icon=award-fill&color=%23dc3545" alt="Visitors">
235
  </div>
236
  </div>
237
  """
 
242
  navigator.clipboard.writeText(document.getElementById('bibtex').innerText)
243
  .then(()=>{this.textContent='✔︎';setTimeout(()=>this.textContent='Copy',1500);});
244
  ">Copy</button>
245
+ <code id="bibtex">@article{edgeface,
246
  title = {{EdgeFace: Efficient Face Recognition Model for Edge Devices}},
247
+ author = {{George, A. and Ecabert, C. and Otroshi, H. and Kotwal, K. and Marcel, S.}},
248
  journal= {{IEEE Trans. Biometrics, Behavior, & Identity Science}},
249
  year = {{2024}}
250
+ }</code>
251
  </div>
252
  """
253
 
 
265
  label="Image B", object_fit="contain")
266
 
267
  with gr.Row():
268
+ # img_a = gr.Image(type="numpy", height=300, label="Image A",
269
+ # elem_classes="preview")
270
+ # img_b = gr.Image(type="numpy", height=300, label="Image B",
271
+ # elem_classes="preview")
272
+
273
+ img_a = gr.Image(type="numpy", height=300, label="Image A (click or drag-drop)",
274
+ interactive=True, elem_classes="preview")
275
+ img_b = gr.Image(type="numpy", height=300, label="Image B (click or drag-drop)",
276
+ interactive=True, elem_classes="preview")
277
 
278
  def _fill(evt: gr.SelectData):
279
  return _as_rgb(PRELOADED[evt.index]) if evt.index is not None else None