Ankur Goyal commited on
Commit
27d0a44
1 Parent(s): 84cfd64

Small styling tweaks

Browse files
Files changed (1) hide show
  1. app.py +14 -2
app.py CHANGED
@@ -136,7 +136,16 @@ def load_example_document(img, question, model):
136
  return document, question, preview, answer
137
 
138
 
139
- with gr.Blocks() as demo:
 
 
 
 
 
 
 
 
 
140
  gr.Markdown("# DocQuery: Query Documents w/ NLP")
141
  document = gr.Variable()
142
  example_question = gr.Textbox(visible=False)
@@ -145,7 +154,9 @@ with gr.Blocks() as demo:
145
  gr.Markdown("## 1. Upload a file or select an example")
146
  with gr.Row(equal_height=True):
147
  with gr.Column():
148
- upload = gr.File(label="Upload a file", interactive=True)
 
 
149
  url = gr.Textbox(label="... or a URL", interactive=True)
150
  gr.Examples(
151
  examples=examples,
@@ -160,6 +171,7 @@ with gr.Blocks() as demo:
160
  placeholder="e.g. What is the invoice number?",
161
  lines=1,
162
  max_lines=1,
 
163
  )
164
  model = gr.Radio(
165
  choices=list(CHECKPOINTS.keys()),
 
136
  return document, question, preview, answer
137
 
138
 
139
+ CSS = """
140
+ #short-upload-box .w-full {
141
+ min-height: 10rem !important;
142
+ }
143
+ #question input {
144
+ font-size: 16px;
145
+ }
146
+ """
147
+
148
+ with gr.Blocks(css=CSS) as demo:
149
  gr.Markdown("# DocQuery: Query Documents w/ NLP")
150
  document = gr.Variable()
151
  example_question = gr.Textbox(visible=False)
 
154
  gr.Markdown("## 1. Upload a file or select an example")
155
  with gr.Row(equal_height=True):
156
  with gr.Column():
157
+ upload = gr.File(
158
+ label="Upload a file", interactive=True, elem_id="short-upload-box"
159
+ )
160
  url = gr.Textbox(label="... or a URL", interactive=True)
161
  gr.Examples(
162
  examples=examples,
 
171
  placeholder="e.g. What is the invoice number?",
172
  lines=1,
173
  max_lines=1,
174
+ elem_id="question",
175
  )
176
  model = gr.Radio(
177
  choices=list(CHECKPOINTS.keys()),