MansiJerry commited on
Commit
88c8c84
·
verified ·
1 Parent(s): b3451d2

making the links appear clickable

Browse files
Files changed (1) hide show
  1. app.py +36 -26
app.py CHANGED
@@ -80,21 +80,21 @@ REFERENCES_TEXT = """
80
  """
81
 
82
  # -------------------------
83
- # Paper links
84
  # -------------------------
85
- PAPER_LINKS = {
86
- "SSD": "https://doi.org/10.1609/aaai.v38i11.29092",
87
- "MACE": "https://doi.org/10.1109/CVPR52733.2024.00615",
88
- "SLD": "https://doi.org/10.1109/CVPR52729.2023.02157",
89
- "UCE": "https://doi.org/10.1109/WACV57701.2024.00503",
90
- "AdvUnlearn": "https://openreview.net/forum?id=dkpmfIydrF",
91
- "SAFREE": "https://openreview.net/forum?id=hgTFotBRKl",
92
- "SAEuron": "https://openreview.net/forum?id=HFCaWGWEzi",
93
- "CogFD": "https://openreview.net/forum?id=OBjF5I4PWg",
94
- "ESD": "https://doi.org/10.1109/ICCV51070.2023.00230",
95
- "CA": "https://doi.org/10.1109/ICCV51070.2023.02074",
96
- "TraSCE": "https://arxiv.org/abs/2412.07658",
97
- "Concept-Steerers": "https://doi.org/10.48550/arXiv.2501.19066",
98
  }
99
 
100
  # -------------------------
@@ -125,10 +125,17 @@ columns = [
125
  df = pd.DataFrame(raw_data, columns=columns)
126
  df["Avg BenchScore"] = ((df["BenchScore-S ↑"] + df["BenchScore-Q ↑"]) / 2).round(4)
127
 
128
- # Make Technique column a clickable HTML link
129
- df["Technique"] = df["Technique"].map(
130
- lambda t: f'<a href="{PAPER_LINKS.get(t, "#")}" target="_blank">{t}</a>'
131
- )
 
 
 
 
 
 
 
132
 
133
  df = df.sort_values("Avg BenchScore", ascending=False).reset_index(drop=True)
134
 
@@ -142,18 +149,21 @@ custom_css = """
142
  """
143
 
144
  # -------------------------
145
- # Citation HTML (avoids Textbox rendering issue)
146
  # -------------------------
147
- CITATION_HTML = """
148
- <div style="background:#1e1e1e; border:1px solid #444; border-radius:8px; padding:16px; margin-top:8px;">
149
- <p style="color:#aaa; margin-bottom:8px; font-size:0.9em;">If you use Eval-Unlearn in your work, please cite:</p>
150
- <pre style="color:#e0e0e0; font-family:monospace; white-space:pre-wrap; margin:0;">@misc{evalunlearn2024,
 
 
 
151
  title={Eval-Unlearn: Unlearning Benchmark for Text-to-Image Models},
152
  author={REAL Lab Imperial},
153
  year={2024},
154
  url={https://github.com/REAL-Lab-Imperial/Eval-Unlearn}
155
- }</pre>
156
- </div>
157
  """
158
 
159
  # -------------------------
@@ -204,6 +214,6 @@ with demo:
204
  gr.Markdown(REFERENCES_TEXT, elem_classes="markdown-text")
205
 
206
  with gr.TabItem("📙 Citation", id=3):
207
- gr.HTML(CITATION_HTML)
208
 
209
  demo.queue(default_concurrency_limit=40).launch()
 
80
  """
81
 
82
  # -------------------------
83
+ # Paper links + citation labels
84
  # -------------------------
85
+ PAPER_INFO = {
86
+ "SSD": ("Foster et al., 2024", "https://doi.org/10.1609/aaai.v38i11.29092"),
87
+ "MACE": ("Lu et al., 2024", "https://doi.org/10.1109/CVPR52733.2024.00615"),
88
+ "SLD": ("Schramowski et al., 2023", "https://doi.org/10.1109/CVPR52729.2023.02157"),
89
+ "UCE": ("Gandikota et al., 2024", "https://doi.org/10.1109/WACV57701.2024.00503"),
90
+ "AdvUnlearn": ("Zhang et al., 2024", "https://openreview.net/forum?id=dkpmfIydrF"),
91
+ "SAFREE": ("Yoon et al., 2025", "https://openreview.net/forum?id=hgTFotBRKl"),
92
+ "SAEuron": ("Cywiński et al., 2025", "https://openreview.net/forum?id=HFCaWGWEzi"),
93
+ "CogFD": ("Nie et al., 2025", "https://openreview.net/forum?id=OBjF5I4PWg"),
94
+ "ESD": ("Gandikota et al., 2023", "https://doi.org/10.1109/ICCV51070.2023.00230"),
95
+ "CA": ("Kumari et al., 2023", "https://doi.org/10.1109/ICCV51070.2023.02074"),
96
+ "TraSCE": ("Jain et al., 2024", "https://arxiv.org/abs/2412.07658"),
97
+ "Concept-Steerers": ("Kim et al., 2025", "https://doi.org/10.48550/arXiv.2501.19066"),
98
  }
99
 
100
  # -------------------------
 
125
  df = pd.DataFrame(raw_data, columns=columns)
126
  df["Avg BenchScore"] = ((df["BenchScore-S ↑"] + df["BenchScore-Q ↑"]) / 2).round(4)
127
 
128
+ # Make Technique column a styled clickable link with citation label
129
+ def make_technique_html(t):
130
+ citation, url = PAPER_INFO.get(t, ("", "#"))
131
+ return (
132
+ f'<a href="{url}" target="_blank" '
133
+ f'style="color:#7eb8f7; text-decoration:underline; font-weight:600;">'
134
+ f'{t}</a> '
135
+ f'<span style="color:#aaa; font-size:0.85em;">({citation})</span>'
136
+ )
137
+
138
+ df["Technique"] = df["Technique"].map(make_technique_html)
139
 
140
  df = df.sort_values("Avg BenchScore", ascending=False).reset_index(drop=True)
141
 
 
149
  """
150
 
151
  # -------------------------
152
+ # Citation Markdown
153
  # -------------------------
154
+ CITATION_TEXT = """
155
+ ## Citation
156
+
157
+ If you use Eval-Unlearn in your work, please cite:
158
+
159
+ ```bibtex
160
+ @misc{evalunlearn2024,
161
  title={Eval-Unlearn: Unlearning Benchmark for Text-to-Image Models},
162
  author={REAL Lab Imperial},
163
  year={2024},
164
  url={https://github.com/REAL-Lab-Imperial/Eval-Unlearn}
165
+ }
166
+ ```
167
  """
168
 
169
  # -------------------------
 
214
  gr.Markdown(REFERENCES_TEXT, elem_classes="markdown-text")
215
 
216
  with gr.TabItem("📙 Citation", id=3):
217
+ gr.Markdown(CITATION_TEXT, elem_classes="markdown-text")
218
 
219
  demo.queue(default_concurrency_limit=40).launch()