Jonas Wiesli commited on
Commit
6b93fa1
1 Parent(s): fb0b627

adjusted css to target specific buttons, removed gradio class declarations because gradio

Browse files
Files changed (2) hide show
  1. app.py +10 -10
  2. style.css +6 -1
app.py CHANGED
@@ -5,9 +5,9 @@ openai.api_key = "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"
5
 
6
  theme = gr.themes.Monochrome()
7
  css = "@import url(https://fonts.googleapis.com/css2?family=Silkscreen&display=swap);.gradio-container{" \
8
- "background-color:#cda678;font-family:Silkscreen;position:relative}.secondary.svelte-58yet2{" \
9
- "background-color:#002366}.abs-window{position:absolute;right:50%;top:50%;transform:translateX(-50%) " \
10
- "translateY(-50%)}"
11
 
12
  with gr.Blocks(theme=theme, css=css) as iface:
13
  chatbot = []
@@ -104,11 +104,11 @@ with gr.Blocks(theme=theme, css=css) as iface:
104
  "mostly medieval. You have a bubbly personality. "]
105
 
106
  with gr.Row() as chatRow:
107
- with gr.Column(scale=2):
108
  questionCounter = gr.Label(label="Remaining Questions", value="24")
109
  mapButton = gr.Button("Show Floor Plan")
110
  finishButton = gr.Button("Try to Solve")
111
- with gr.Column(scale=10):
112
  i = 0
113
  while i < len(roles):
114
  with gr.Tab(roles[i]):
@@ -117,21 +117,21 @@ with gr.Blocks(theme=theme, css=css) as iface:
117
  chatbot.append(gr.Chatbot(label=roles[i]))
118
  msg.append(gr.Textbox(label=""))
119
  with gr.Column(scale=3):
120
- characterImage = gr.Label(label="", elem_classes="character-image-" + str(i))
121
  i += 1
122
 
123
- with gr.Row(visible=False, elem_classes="abs-window") as mapRow:
124
  with gr.Column():
125
- closeMapButton = gr.Button("X", elem_classes="close-button")
126
 
127
- with gr.Row(visible=False, elem_classes="abs-window") as solvingRow:
128
  i = 0
129
  while i < len(roles):
130
  with gr.Column():
131
  accusationButtons.append(gr.Button(roles[i]))
132
  i += 1
133
 
134
- closeSolvingButton = gr.Button("X", elem_classes="close-button")
135
 
136
  with gr.Row(visible=False) as resultRow:
137
  with gr.Column():
 
5
 
6
  theme = gr.themes.Monochrome()
7
  css = "@import url(https://fonts.googleapis.com/css2?family=Silkscreen&display=swap);.gradio-container{" \
8
+ "background-color:#cda678;font-family:Silkscreen;position:relative}.tabitem{" \
9
+ "background-color:#000}.secondary.svelte-58yet2{background-color:#002366}#component-48,#component-51{" \
10
+ "position:absolute;right:50%;top:50%;transform:translateX(-50%) translateY(-50%);width:50%}"
11
 
12
  with gr.Blocks(theme=theme, css=css) as iface:
13
  chatbot = []
 
104
  "mostly medieval. You have a bubbly personality. "]
105
 
106
  with gr.Row() as chatRow:
107
+ with gr.Column(scale=1):
108
  questionCounter = gr.Label(label="Remaining Questions", value="24")
109
  mapButton = gr.Button("Show Floor Plan")
110
  finishButton = gr.Button("Try to Solve")
111
+ with gr.Column(scale=6):
112
  i = 0
113
  while i < len(roles):
114
  with gr.Tab(roles[i]):
 
117
  chatbot.append(gr.Chatbot(label=roles[i]))
118
  msg.append(gr.Textbox(label=""))
119
  with gr.Column(scale=3):
120
+ characterImage = gr.Label(label="")
121
  i += 1
122
 
123
+ with gr.Row(visible=False) as mapRow:
124
  with gr.Column():
125
+ closeMapButton = gr.Button("X")
126
 
127
+ with gr.Row(visible=False) as solvingRow:
128
  i = 0
129
  while i < len(roles):
130
  with gr.Column():
131
  accusationButtons.append(gr.Button(roles[i]))
132
  i += 1
133
 
134
+ closeSolvingButton = gr.Button("X")
135
 
136
  with gr.Row(visible=False) as resultRow:
137
  with gr.Column():
style.css CHANGED
@@ -6,13 +6,18 @@
6
  position: relative;
7
  }
8
 
 
 
 
 
9
  .secondary.svelte-58yet2 {
10
  background-color: #002366;
11
  }
12
 
13
- .abs-window {
14
  position: absolute;
15
  right: 50%;
16
  top: 50%;
17
  transform: translateX(-50%) translateY(-50%);
 
18
  }
 
6
  position: relative;
7
  }
8
 
9
+ .tabitem {
10
+ background-color: #000;
11
+ }
12
+
13
  .secondary.svelte-58yet2 {
14
  background-color: #002366;
15
  }
16
 
17
+ #component-48, #component-51 {
18
  position: absolute;
19
  right: 50%;
20
  top: 50%;
21
  transform: translateX(-50%) translateY(-50%);
22
+ width: 50%;
23
  }