juhoinkinen commited on
Commit
8f9e3fe
·
unverified ·
1 Parent(s): 97b2abf

Try styling gradio elements with elem_classes param

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -80,7 +80,7 @@ css = """
80
  font-size: 1.2rem;
81
  line-height: 1.2;
82
  }
83
- body {
84
  background-color: white;
85
  color: #343260;
86
  font-family: Jost, sans-serif;
@@ -172,15 +172,15 @@ with gr.Blocks(css=css) as interface:
172
 
173
  with gr.Row():
174
  with gr.Column(scale=3):
175
- image_input = gr.Image(type="numpy", label="Upload Image")
176
  with gr.Column(scale=1):
177
- project = gr.Dropdown(choices=proj_names, label="Project (vocabulary and language)", type="index")
178
- lang = gr.Dropdown(choices=langs, label="Select Language", type="value", value="eng")
179
- submit_btn = gr.Button("Get suggestions", elem_id="get-suggestions")
180
 
181
  with gr.Row():
182
  with gr.Column(scale=3):
183
- text_output = gr.Textbox(label="Extracted Text")
184
  with gr.Column(scale=1):
185
  html_output = gr.HTML()
186
 
 
80
  font-size: 1.2rem;
81
  line-height: 1.2;
82
  }
83
+ body, .mygrclass {
84
  background-color: white;
85
  color: #343260;
86
  font-family: Jost, sans-serif;
 
172
 
173
  with gr.Row():
174
  with gr.Column(scale=3):
175
+ image_input = gr.Image(type="numpy", label="Upload Image", elem_classes="mygrclass")
176
  with gr.Column(scale=1):
177
+ project = gr.Dropdown(choices=proj_names, label="Project (vocabulary and language)", type="index", elem_classes="mygrclass")
178
+ lang = gr.Dropdown(choices=langs, label="Select Language", type="value", value="eng", elem_classes="mygrclass")
179
+ submit_btn = gr.Button("Get suggestions", elem_id="get-suggestions", elem_classes="mygrclass")
180
 
181
  with gr.Row():
182
  with gr.Column(scale=3):
183
+ text_output = gr.Textbox(label="Extracted Text", elem_classes="mygrclass")
184
  with gr.Column(scale=1):
185
  html_output = gr.HTML()
186