Spaces:
Sleeping
Sleeping
tiny tiny pretty things
Browse files
README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
---
|
2 |
-
title: Labeling Template
|
3 |
-
emoji:
|
4 |
colorFrom: purple
|
5 |
colorTo: gray
|
6 |
sdk: gradio
|
|
|
1 |
---
|
2 |
+
title: Pairwise Labeling Template
|
3 |
+
emoji: 🏷️
|
4 |
colorFrom: purple
|
5 |
colorTo: gray
|
6 |
sdk: gradio
|
app.py
CHANGED
@@ -20,7 +20,18 @@ HF_INPUT_DATASET_URL_COLUMN = os.getenv("HF_INPUT_DATASET_URL_COLUMN")
|
|
20 |
HF_OUTPUT_DATASET = os.getenv("HF_OUTPUT_DATASET")
|
21 |
HF_OUTPUT_DATASET_DIR = os.getenv("HF_OUTPUT_DATASET_DIR")
|
22 |
INSTRUCTIONS = """
|
23 |
-
# Pairwise Model Output Labeling
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
|
25 |
Please compare the two model outputs shown below and select which one you think is better.
|
26 |
- Choose "A is better" if the output from Model A (left) is superior
|
@@ -188,7 +199,6 @@ with gr.Blocks(css="footer {visibility: hidden}") as app:
|
|
188 |
start_btn = gr.Button("Start Session", variant="primary", scale=1)
|
189 |
|
190 |
# URL display component - only shown if URL column is defined
|
191 |
-
print(labeler.has_url_column)
|
192 |
if labeler.has_url_column:
|
193 |
url_display = gr.HTML(label="Reference URL", value="", visible=True)
|
194 |
|
|
|
20 |
HF_OUTPUT_DATASET = os.getenv("HF_OUTPUT_DATASET")
|
21 |
HF_OUTPUT_DATASET_DIR = os.getenv("HF_OUTPUT_DATASET_DIR")
|
22 |
INSTRUCTIONS = """
|
23 |
+
# Pairwise Model Output Labeling Space
|
24 |
+
|
25 |
+
### How-to:
|
26 |
+
|
27 |
+
* Duplicate this Space
|
28 |
+
* Add a `HF_TOKEN` secret in the Space settings (it saves the results to a given dataset, so it requires write access)
|
29 |
+
* Set the environment variables in the [`.env`](https://huggingface.co/spaces/saridormi/labeling-template/blob/main/.env) file to point to correct datasets/columns/paths for your input and output data
|
30 |
+
* Adjust `INSTRUCTIONS` (it's what's rendered here) and `SAVE_EVERY_N_EXAMPLES` (how often should answers be saved to the output dataset) in the [`app.py`](https://huggingface.co/spaces/saridormi/labeling-template/blob/main/app.py) file
|
31 |
+
|
32 |
+
Done! 💛
|
33 |
+
|
34 |
+
### About:
|
35 |
|
36 |
Please compare the two model outputs shown below and select which one you think is better.
|
37 |
- Choose "A is better" if the output from Model A (left) is superior
|
|
|
199 |
start_btn = gr.Button("Start Session", variant="primary", scale=1)
|
200 |
|
201 |
# URL display component - only shown if URL column is defined
|
|
|
202 |
if labeler.has_url_column:
|
203 |
url_display = gr.HTML(label="Reference URL", value="", visible=True)
|
204 |
|