Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -33,7 +33,7 @@ pipe = pipeline(
|
|
33 |
|
34 |
@spaces.GPU
|
35 |
def infer(prompt):
|
36 |
-
return
|
37 |
|
38 |
default_experiment = """You will take part in a Social Prediction Game.
|
39 |
You will observe a Player playing against an Opponent.
|
@@ -52,15 +52,24 @@ You predict that Player will choose option <<
|
|
52 |
with gr.Blocks(
|
53 |
fill_width=True,
|
54 |
css="""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
#prompt-box textarea {
|
56 |
height: 400px;
|
57 |
-
border:
|
58 |
-
box-shadow: none !important;
|
59 |
}
|
60 |
#prompt-box textarea:focus {
|
61 |
-
outline:
|
62 |
}
|
63 |
-
|
|
|
|
|
64 |
""",
|
65 |
) as demo:
|
66 |
|
|
|
33 |
|
34 |
@spaces.GPU
|
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 take part in a Social Prediction Game.
|
39 |
You will observe a Player playing against an Opponent.
|
|
|
52 |
with gr.Blocks(
|
53 |
fill_width=True,
|
54 |
css="""
|
55 |
+
/* ---- kill the outer frame ---- */
|
56 |
+
#prompt-box {
|
57 |
+
border: none !important; /* wipe wrapper border */
|
58 |
+
box-shadow: none !important; /* wipe wrapper shadow */
|
59 |
+
}
|
60 |
+
|
61 |
+
/* ---- keep / style the inner textarea ---- */
|
62 |
#prompt-box textarea {
|
63 |
height: 400px;
|
64 |
+
border: 1px solid var(--input-border-color, #d9d9d9); /* normal inner border */
|
65 |
+
box-shadow: none !important; /* but no inset shadow */
|
66 |
}
|
67 |
#prompt-box textarea:focus {
|
68 |
+
outline: 2px solid var(--primary-600, #2684ff); /* optional focus ring */
|
69 |
}
|
70 |
+
|
71 |
+
/* just spacing for the info banner */
|
72 |
+
#info-box { margin-bottom: 1rem }
|
73 |
""",
|
74 |
) as demo:
|
75 |
|