begumcig commited on
Commit
b4c3954
·
verified ·
1 Parent(s): c0c4e27

Credit the prompt datasets in the app: About references and a source line in Samples

Browse files

- About tab: a 'Datasets, licenses and references' section. It lists each prompt dataset, its license and its reference, and links to the README BibTeX.
- Samples tab: a one-line source and license credit above the prompts for OneIG-Bench (CC BY-NC 4.0), Qwen-Image-Bench and VBench-2.0.
- Checked locally with gradio 5.19.0: the app starts, and each dataset shows its credit.

Files changed (2) hide show
  1. app.py +28 -0
  2. ui.py +37 -0
app.py CHANGED
@@ -1291,6 +1291,7 @@ button.theme-toggle[data-mode="light"] .theme-icon-moon { display: block !import
1291
  }
1292
 
1293
  .compare-samples-help { color: var(--pruna-text-body); margin-bottom: 8px; }
 
1294
  .compare-controls,
1295
  .compare-controls.row,
1296
  .compare-controls.column,
@@ -2622,6 +2623,33 @@ qwen_samples = load_sample_comparison_data(qwen_combined_dir)
2622
  video_samples = load_sample_comparison_data(video_combined_dir)
2623
  text_to_video_samples = load_sample_comparison_data(text_to_video_combined_dir)
2624
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2625
  metrics = [
2626
  {"id": "datapoint_elo", "column": "Datapoint Elo"},
2627
  {"id": "rapidata_elo", "column": "Rapidata Elo"},
 
1291
  }
1292
 
1293
  .compare-samples-help { color: var(--pruna-text-body); margin-bottom: 8px; }
1294
+ .compare-samples-credit { color: var(--pruna-text-muted); font-size: 0.9em; margin: 0 0 12px; }
1295
  .compare-controls,
1296
  .compare-controls.row,
1297
  .compare-controls.column,
 
2623
  video_samples = load_sample_comparison_data(video_combined_dir)
2624
  text_to_video_samples = load_sample_comparison_data(text_to_video_combined_dir)
2625
 
2626
+ # Source credit shown above the sample prompts (full references are in the About tab).
2627
+ SAMPLE_PROMPT_CREDITS = {
2628
+ "oneig": (
2629
+ 'Prompts: <a href="https://huggingface.co/datasets/OneIG-Bench/OneIG-Bench" '
2630
+ 'target="_blank" rel="noopener noreferrer">OneIG-Bench</a> (Chang et al., 2025), '
2631
+ 'licensed <a href="https://creativecommons.org/licenses/by-nc/4.0/" target="_blank" '
2632
+ 'rel="noopener noreferrer">CC BY-NC 4.0</a>, non-commercial use only. See About for references.'
2633
+ ),
2634
+ "qwen": (
2635
+ 'Prompts: <a href="https://huggingface.co/datasets/Qwen/Qwen-Image-Bench" '
2636
+ 'target="_blank" rel="noopener noreferrer">Qwen-Image-Bench</a> (Li et al., 2026), '
2637
+ "Apache 2.0. See About for references."
2638
+ ),
2639
+ "text_to_video": (
2640
+ 'Prompts: <a href="https://github.com/Vchitect/VBench/tree/master/VBench-2.0" '
2641
+ 'target="_blank" rel="noopener noreferrer">VBench-2.0</a> (Zheng et al., 2025), '
2642
+ "Apache 2.0. See About for references."
2643
+ ),
2644
+ }
2645
+ for _samples, _credit_id in (
2646
+ (oneig_samples, "oneig"),
2647
+ (qwen_samples, "qwen"),
2648
+ (text_to_video_samples, "text_to_video"),
2649
+ ):
2650
+ if _samples:
2651
+ _samples["credit"] = SAMPLE_PROMPT_CREDITS[_credit_id]
2652
+
2653
  metrics = [
2654
  {"id": "datapoint_elo", "column": "Datapoint Elo"},
2655
  {"id": "rapidata_elo", "column": "Rapidata Elo"},
ui.py CHANGED
@@ -161,6 +161,39 @@ price vs score only.
161
  External text-to-image Elo (overall and category) from Arena AI. Their
162
  prompt set is private, so samples are not shown. Price and generation time
163
  are not in this export, so Pareto plots are unavailable.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
164
  """
165
 
166
  ABOUT_DETAILS_CONTENT = """
@@ -1383,6 +1416,10 @@ def _build_compare_samples_html(samples, selected_models, num_prompts, seed=0):
1383
  """
1384
  )
1385
 
 
 
 
 
1386
  return "\n".join(blocks)
1387
 
1388
 
 
161
  External text-to-image Elo (overall and category) from Arena AI. Their
162
  prompt set is private, so samples are not shown. Price and generation time
163
  are not in this export, so Pareto plots are unavailable.
164
+
165
+ ## Datasets, licenses and references
166
+
167
+ The P-Bench code is released under the Apache License 2.0. The benchmark
168
+ prompts shown in Samples are copied verbatim from their original datasets and
169
+ keep those datasets' licenses; P-Bench uses a selection of each and adds its
170
+ own prompt IDs.
171
+
172
+ - **OneIG Alignment Dataset**: prompts from
173
+ [OneIG-Bench](https://huggingface.co/datasets/OneIG-Bench/OneIG-Bench),
174
+ licensed [CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/)
175
+ (non-commercial use only).
176
+ Jingjing Chang, Yixiao Fang, Peng Xing, Shuhan Wu, Wei Cheng, Rui Wang,
177
+ Xianfang Zeng, Gang Yu and Hai-Bao Chen. *OneIG-Bench: Omni-dimensional
178
+ Nuanced Evaluation for Image Generation.* arXiv:2506.07977, 2025.
179
+ - **Qwen Image Dataset**: prompts from
180
+ [Qwen-Image-Bench](https://huggingface.co/datasets/Qwen/Qwen-Image-Bench),
181
+ licensed Apache 2.0.
182
+ Niantong Li et al. *Qwen-Image-Bench: From Generation to Creation in
183
+ Text-to-Image Evaluation.* arXiv:2605.28091, 2026.
184
+ - **VBench-2.0 Dataset**: prompts from
185
+ [VBench-2.0](https://github.com/Vchitect/VBench/tree/master/VBench-2.0),
186
+ licensed Apache 2.0.
187
+ Dian Zheng, Ziqi Huang, Hongbo Liu, Kai Zou, Yinan He, Fan Zhang, Yuanhan
188
+ Zhang, Jingwen He, Wei-Shi Zheng, Yu Qiao and Ziwei Liu. *VBench-2.0:
189
+ Advancing Video Generation Benchmark Suite for Intrinsic Faithfulness.*
190
+ arXiv:2503.21755, 2025.
191
+ - **Artificial Analysis Dataset** and **Arena AI Dataset**: Elo (and
192
+ Artificial Analysis price) as published on their leaderboards, under
193
+ their terms of use.
194
+
195
+ BibTeX for all of these is in the
196
+ [Space README](https://huggingface.co/spaces/PrunaAI/P-Bench/blob/main/README.md#citation).
197
  """
198
 
199
  ABOUT_DETAILS_CONTENT = """
 
1416
  """
1417
  )
1418
 
1419
+ credit = (samples or {}).get("credit")
1420
+ if credit:
1421
+ # Static HTML from SAMPLE_PROMPT_CREDITS in app.py (not user input).
1422
+ blocks.insert(0, f'<p class="compare-samples-credit">{credit}</p>')
1423
  return "\n".join(blocks)
1424
 
1425