Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -35,18 +35,15 @@ pipe = pipeline(
|
|
| 35 |
def infer(prompt):
|
| 36 |
return pipe(prompt, max_new_tokens=1, do_sample=True, temperature=1.0, return_full_text=True)[0]["generated_text"]
|
| 37 |
|
| 38 |
-
default_experiment = """You will
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
Both parties win points based on their choices.
|
| 42 |
-
Your task is to predict the choices made by the Player.
|
| 43 |
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
You predict that Player will choose option <<"""
|
| 50 |
|
| 51 |
with gr.Blocks(
|
| 52 |
fill_width=True,
|
|
@@ -54,17 +51,14 @@ with gr.Blocks(
|
|
| 54 |
#prompt-box textarea {height:256px}
|
| 55 |
""",
|
| 56 |
) as demo:
|
| 57 |
-
|
| 58 |
-
# (optional) add a logo or hero image
|
| 59 |
gr.Image(
|
| 60 |
value="https://marcelbinz.github.io/imgs/centaur.png",
|
| 61 |
show_label=False,
|
| 62 |
height=180,
|
| 63 |
container=False,
|
| 64 |
-
elem_classes="mx-auto",
|
| 65 |
)
|
| 66 |
|
| 67 |
-
# ---------- NEW: info banner ----------
|
| 68 |
gr.Markdown(
|
| 69 |
"""
|
| 70 |
### How to prompt:
|
|
|
|
| 35 |
def infer(prompt):
|
| 36 |
return pipe(prompt, max_new_tokens=1, do_sample=True, temperature=1.0, return_full_text=True)[0]["generated_text"]
|
| 37 |
|
| 38 |
+
default_experiment = """You will be presented with triplets of objects, which will be assigned to the keys H, Y, and E.
|
| 39 |
+
In each trial, please indicate which object you think is the odd one out by pressing the corresponding key.
|
| 40 |
+
In other words, please choose the object that is the least similar to the other two.
|
|
|
|
|
|
|
| 41 |
|
| 42 |
+
H: plant, Y: chainsaw, and E: periscope. You press <<H>>.
|
| 43 |
+
H: tostada, Y: leaf, and E: sail. You press <<H>>.
|
| 44 |
+
H: clock, Y: crystal, and E: grate. You press <<Y>>.
|
| 45 |
+
H: barbed wire, Y: kale, and E: sweater. You press <<E>>.
|
| 46 |
+
H: raccoon, Y: toothbrush, and E: ice. You press <<"""
|
|
|
|
| 47 |
|
| 48 |
with gr.Blocks(
|
| 49 |
fill_width=True,
|
|
|
|
| 51 |
#prompt-box textarea {height:256px}
|
| 52 |
""",
|
| 53 |
) as demo:
|
|
|
|
|
|
|
| 54 |
gr.Image(
|
| 55 |
value="https://marcelbinz.github.io/imgs/centaur.png",
|
| 56 |
show_label=False,
|
| 57 |
height=180,
|
| 58 |
container=False,
|
| 59 |
+
elem_classes="mx-auto",
|
| 60 |
)
|
| 61 |
|
|
|
|
| 62 |
gr.Markdown(
|
| 63 |
"""
|
| 64 |
### How to prompt:
|