Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -223,32 +223,25 @@ CSS = """
|
|
223 |
border-radius: 8px;
|
224 |
color: #1B8700
|
225 |
}
|
226 |
-
|
227 |
table.gr-samples-table tr td {
|
228 |
border: none;
|
229 |
outline: none;
|
230 |
}
|
231 |
-
|
232 |
table.gr-samples-table tr td:first-of-type {
|
233 |
width: 0%;
|
234 |
}
|
235 |
-
|
236 |
div#short-upload-box div.absolute {
|
237 |
display: none !important;
|
238 |
}
|
239 |
-
|
240 |
gradio-app > div > div > div > div.w-full > div, .gradio-app > div > div > div > div.w-full > div {
|
241 |
gap: 0px 2%;
|
242 |
}
|
243 |
-
|
244 |
gradio-app div div div div.w-full, .gradio-app div div div div.w-full {
|
245 |
gap: 0px;
|
246 |
}
|
247 |
-
|
248 |
gradio-app h2, .gradio-app h2 {
|
249 |
padding-top: 10px;
|
250 |
}
|
251 |
-
|
252 |
#answer {
|
253 |
overflow-y: scroll;
|
254 |
color: white;
|
@@ -257,18 +250,15 @@ gradio-app h2, .gradio-app h2 {
|
|
257 |
font-size: 20px;
|
258 |
font-weight: bold;
|
259 |
}
|
260 |
-
|
261 |
#answer span {
|
262 |
color: white;
|
263 |
}
|
264 |
-
|
265 |
#answer textarea {
|
266 |
color:white;
|
267 |
background: #777;
|
268 |
border-color: #777;
|
269 |
font-size: 18px;
|
270 |
}
|
271 |
-
|
272 |
#url-error input {
|
273 |
color: red;
|
274 |
}
|
@@ -284,7 +274,7 @@ with gr.Blocks(css=CSS) as demo:
|
|
284 |
with gr.Row(equal_height=True):
|
285 |
with gr.Column():
|
286 |
with gr.Row():
|
287 |
-
gr.Markdown("## 1. Upload
|
288 |
img_clear_button = gr.Button(
|
289 |
"Clear", variant="secondary", elem_id="file-clear", visible=False
|
290 |
)
|
@@ -309,17 +299,24 @@ with gr.Blocks(css=CSS) as demo:
|
|
309 |
)
|
310 |
gr.Markdown("— or —")
|
311 |
upload = gr.File(label=None, interactive=True, elem_id="short-upload-box")
|
312 |
-
|
|
|
|
|
|
|
313 |
|
314 |
with gr.Column() as col:
|
315 |
gr.Markdown("## 2. Ask a question")
|
316 |
question = gr.Textbox(
|
317 |
label="Question",
|
318 |
-
placeholder="e.g.
|
319 |
lines=1,
|
320 |
max_lines=1,
|
321 |
)
|
322 |
-
|
|
|
|
|
|
|
|
|
323 |
|
324 |
with gr.Row():
|
325 |
clear_button = gr.Button("Clear", variant="secondary")
|
@@ -397,4 +394,4 @@ with gr.Blocks(css=CSS) as demo:
|
|
397 |
)
|
398 |
|
399 |
if __name__ == "__main__":
|
400 |
-
demo.launch(enable_queue=False)
|
|
|
223 |
border-radius: 8px;
|
224 |
color: #1B8700
|
225 |
}
|
|
|
226 |
table.gr-samples-table tr td {
|
227 |
border: none;
|
228 |
outline: none;
|
229 |
}
|
|
|
230 |
table.gr-samples-table tr td:first-of-type {
|
231 |
width: 0%;
|
232 |
}
|
|
|
233 |
div#short-upload-box div.absolute {
|
234 |
display: none !important;
|
235 |
}
|
|
|
236 |
gradio-app > div > div > div > div.w-full > div, .gradio-app > div > div > div > div.w-full > div {
|
237 |
gap: 0px 2%;
|
238 |
}
|
|
|
239 |
gradio-app div div div div.w-full, .gradio-app div div div div.w-full {
|
240 |
gap: 0px;
|
241 |
}
|
|
|
242 |
gradio-app h2, .gradio-app h2 {
|
243 |
padding-top: 10px;
|
244 |
}
|
|
|
245 |
#answer {
|
246 |
overflow-y: scroll;
|
247 |
color: white;
|
|
|
250 |
font-size: 20px;
|
251 |
font-weight: bold;
|
252 |
}
|
|
|
253 |
#answer span {
|
254 |
color: white;
|
255 |
}
|
|
|
256 |
#answer textarea {
|
257 |
color:white;
|
258 |
background: #777;
|
259 |
border-color: #777;
|
260 |
font-size: 18px;
|
261 |
}
|
|
|
262 |
#url-error input {
|
263 |
color: red;
|
264 |
}
|
|
|
274 |
with gr.Row(equal_height=True):
|
275 |
with gr.Column():
|
276 |
with gr.Row():
|
277 |
+
gr.Markdown("## 1. Upload resume", elem_id="select-a-file")
|
278 |
img_clear_button = gr.Button(
|
279 |
"Clear", variant="secondary", elem_id="file-clear", visible=False
|
280 |
)
|
|
|
299 |
)
|
300 |
gr.Markdown("— or —")
|
301 |
upload = gr.File(label=None, interactive=True, elem_id="short-upload-box")
|
302 |
+
gr.Examples(
|
303 |
+
examples=examples,
|
304 |
+
inputs=[example_image, example_question],
|
305 |
+
)
|
306 |
|
307 |
with gr.Column() as col:
|
308 |
gr.Markdown("## 2. Ask a question")
|
309 |
question = gr.Textbox(
|
310 |
label="Question",
|
311 |
+
placeholder="e.g. What is the work experience?",
|
312 |
lines=1,
|
313 |
max_lines=1,
|
314 |
)
|
315 |
+
model = gr.Radio(
|
316 |
+
choices=list(CHECKPOINTS.keys()),
|
317 |
+
value=list(CHECKPOINTS.keys())[0],
|
318 |
+
label="Model",
|
319 |
+
)
|
320 |
|
321 |
with gr.Row():
|
322 |
clear_button = gr.Button("Clear", variant="secondary")
|
|
|
394 |
)
|
395 |
|
396 |
if __name__ == "__main__":
|
397 |
+
demo.launch(enable_queue=False)
|