marcelbinz commited on
Commit
7c7d1cd
·
verified ·
1 Parent(s): 0c9991b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -5
app.py CHANGED
@@ -33,7 +33,7 @@ pipe = pipeline(
33
 
34
  @spaces.GPU
35
  def infer(prompt):
36
- return prompt + pipe(prompt, max_new_tokens=1, do_sample=True, temperature=1.0, return_full_text=False)[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,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: none !important; /* kill the border */
58
- box-shadow: none !important; /* remove the inset grey outline */
59
  }
60
  #prompt-box textarea:focus {
61
- outline: none !important; /* no blue outline on focus */
62
  }
63
- #info-box {margin-bottom: 1rem}
 
 
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