to-be commited on
Commit
7384818
1 Parent(s): 47a338b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -2
app.py CHANGED
@@ -68,11 +68,18 @@ title = "Demo: Donut 🍩 for invoice header retrieval"
68
  #demo = gr.Interface(fn=process_document,inputs=gr_image,outputs="json",title="Demo: Donut 🍩 for invoice header retrieval", description=description,
69
  # article=article,enable_queue=True, examples=[["example.jpg"], ["example_2.jpg"], ["example_3.jpg"]], cache_examples=False)
70
 
71
- with gr.Blocks() as demo:
 
 
 
 
 
 
 
72
  gr.Markdown(title)
73
  gr.Markdown(description)
74
 
75
- inp = gr.Image(label='Upload invoice here:').style(height=400)
76
  with gr.Row().style():
77
  with gr.Column(scale=1):
78
  gr.Examples([["example.jpg"], ["example_2.jpg"], ["example_3.jpg"]], inputs=[inp])
 
68
  #demo = gr.Interface(fn=process_document,inputs=gr_image,outputs="json",title="Demo: Donut 🍩 for invoice header retrieval", description=description,
69
  # article=article,enable_queue=True, examples=[["example.jpg"], ["example_2.jpg"], ["example_3.jpg"]], cache_examples=False)
70
 
71
+ css = "#inp {height: 40rem !important; width: 100% !important;}"
72
+ # css = "@media screen and (max-width: 600px) { .output_image, .input_image {height:20rem !important; width: 100% !important;} }"
73
+ # css = ".output_image, .input_image {height: 600px !important}"
74
+
75
+ css = ".image-preview {height: auto !important;}"
76
+
77
+
78
+ with gr.Blocks(css=css) as demo:
79
  gr.Markdown(title)
80
  gr.Markdown(description)
81
 
82
+ inp = gr.Image(label='Upload invoice here:',elem_id="inp").style(height=400)
83
  with gr.Row().style():
84
  with gr.Column(scale=1):
85
  gr.Examples([["example.jpg"], ["example_2.jpg"], ["example_3.jpg"]], inputs=[inp])