Jonas Wiesli commited on
Commit
67a2db8
1 Parent(s): e4434b8

change loading text, rework margins

Browse files
Files changed (3) hide show
  1. app.py +18 -17
  2. img/map.jpg +0 -0
  3. style.css +5 -0
app.py CHANGED
@@ -22,11 +22,13 @@ css = "@import url(https://fonts.googleapis.com/css2?family=Silkscreen:wght@400;
22
  "content:\"\";width:10px;height:10px;position:absolute;bottom:-1px;border:1px solid var(" \
23
  "--color-border-accent);background-color:var(--color-accent-soft)}.bot.svelte-a99nd8.svelte-a99nd8::before{" \
24
  "left:-10px;border-right:0}.user.svelte-a99nd8.svelte-a99nd8::after{right:-10px;border-left:0}textarea{" \
25
- "background-color:#fff}#component-48,#component-51{position:absolute;left:50%;top:50%;transform:translateX(" \
26
- "-50%) translateY(-50%);width:50%;height:50vh;padding:80px 20px 20px;background-color:#fff;border:1px solid " \
27
- "#002366}#component-49{position:initial}#component-50,#component-62{" \
28
- "position:absolute;top:20px;right:20px;width:44px;height:44px;min-width:44px;min-height:44px}.output-class" \
29
- ".svelte-1s28oeb.svelte-1s28oeb.svelte-1s28oeb,div.svelte-1eq475l{font-weight:400}"
 
 
30
 
31
  with gr.Blocks(theme=theme, css=css) as iface:
32
  chatbot = []
@@ -147,8 +149,7 @@ with gr.Blocks(theme=theme, css=css) as iface:
147
  with gr.Row(visible=False) as solvingRow:
148
  i = 0
149
  while i < len(roles):
150
- with gr.Column():
151
- accusationButtons.append(gr.Button(roles[i]))
152
  i += 1
153
 
154
  closeSolvingButton = gr.Button("X")
@@ -214,18 +215,18 @@ with gr.Blocks(theme=theme, css=css) as iface:
214
  return remaining_questions > 0
215
 
216
  def disable_input():
217
- return gr.update(interactive=False), \
218
- gr.update(interactive=False), \
219
- gr.update(interactive=False), \
220
- gr.update(interactive=False), \
221
- gr.update(interactive=False)
222
 
223
  def enable_input():
224
- return gr.update(interactive=True), \
225
- gr.update(interactive=True), \
226
- gr.update(interactive=True), \
227
- gr.update(interactive=True), \
228
- gr.update(interactive=True)
229
 
230
  def try_to_solve():
231
  return {solvingRow: gr.update(visible=True)}
 
22
  "content:\"\";width:10px;height:10px;position:absolute;bottom:-1px;border:1px solid var(" \
23
  "--color-border-accent);background-color:var(--color-accent-soft)}.bot.svelte-a99nd8.svelte-a99nd8::before{" \
24
  "left:-10px;border-right:0}.user.svelte-a99nd8.svelte-a99nd8::after{right:-10px;border-left:0}textarea{" \
25
+ "background-color:#fff;height:50px!important}#component-48,#component-51{" \
26
+ "position:absolute;left:50%;top:50%;transform:translateX(-50%) translateY(" \
27
+ "-50%);width:50%;height:50vh;padding:80px 20px 20px;background-color:#fff;border:1px solid " \
28
+ "#002366}#component-49{position:initial;background-image:url(" \
29
+ "\"/img/map.jpg\");background-position:center;background-repeat:no-repeat;background-size:contain}#component" \
30
+ "-50,#component-62{position:absolute;top:20px;right:20px;width:44px;height:44px;min-width:44px;min-height:44px" \
31
+ "}.output-class.svelte-1s28oeb.svelte-1s28oeb.svelte-1s28oeb,div.svelte-1eq475l{font-weight:400}"
32
 
33
  with gr.Blocks(theme=theme, css=css) as iface:
34
  chatbot = []
 
149
  with gr.Row(visible=False) as solvingRow:
150
  i = 0
151
  while i < len(roles):
152
+ accusationButtons.append(gr.Button(roles[i]))
 
153
  i += 1
154
 
155
  closeSolvingButton = gr.Button("X")
 
215
  return remaining_questions > 0
216
 
217
  def disable_input():
218
+ return gr.update(interactive=False, placeholder="Waiting for an answer..."), \
219
+ gr.update(interactive=False, placeholder="Waiting for an answer..."), \
220
+ gr.update(interactive=False, placeholder="Waiting for an answer..."), \
221
+ gr.update(interactive=False, placeholder="Waiting for an answer..."), \
222
+ gr.update(interactive=False, placeholder="Waiting for an answer...")
223
 
224
  def enable_input():
225
+ return gr.update(interactive=True, placeholder="Ask a question..."), \
226
+ gr.update(interactive=True, placeholder="Ask a question..."), \
227
+ gr.update(interactive=True, placeholder="Ask a question..."), \
228
+ gr.update(interactive=True, placeholder="Ask a question..."), \
229
+ gr.update(interactive=True, placeholder="Ask a question...")
230
 
231
  def try_to_solve():
232
  return {solvingRow: gr.update(visible=True)}
img/map.jpg ADDED
style.css CHANGED
@@ -74,6 +74,7 @@
74
 
75
  textarea {
76
  background-color: #fff;
 
77
  }
78
 
79
  #component-48, #component-51 {
@@ -90,6 +91,10 @@ textarea {
90
 
91
  #component-49 {
92
  position: initial;
 
 
 
 
93
  }
94
 
95
  #component-50, #component-62 {
 
74
 
75
  textarea {
76
  background-color: #fff;
77
+ height: 50px !important;
78
  }
79
 
80
  #component-48, #component-51 {
 
91
 
92
  #component-49 {
93
  position: initial;
94
+ background-image: url(\"/img/map.jpg\");
95
+ background-position: center;
96
+ background-repeat: no-repeat;
97
+ background-size: contain;
98
  }
99
 
100
  #component-50, #component-62 {