MRaudhatul commited on
Commit
7233fd9
·
verified ·
1 Parent(s): f6e739c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +30 -20
app.py CHANGED
@@ -97,6 +97,8 @@ css = """
97
  .gradio-container {
98
  max-width: 1400px !important;
99
  margin: auto;
 
 
100
  }
101
 
102
  footer {
@@ -110,11 +112,17 @@ footer {
110
  margin-bottom:10px;
111
  }
112
 
113
- .subtitle {
114
- text-align:center;
115
- font-size:18px;
116
- color:#555;
117
- margin-bottom:25px;
 
 
 
 
 
 
118
  }
119
  """
120
 
@@ -289,19 +297,18 @@ with gr.Blocks(
289
 
290
  with gr.Tab("🖼️ Generate"):
291
 
292
- with gr.Row():
293
-
294
  image_input = gr.Image(
295
- sources=[
296
- "upload",
297
- "webcam"
298
- ],
299
  type="pil",
300
- label="Input Image"
 
301
  )
302
-
303
  image_output = gr.Image(
304
- label="Original Image"
 
305
  )
306
 
307
  task_dropdown = gr.Dropdown(
@@ -344,14 +351,16 @@ with gr.Blocks(
344
  lines=5
345
  )
346
 
347
- with gr.Row():
348
-
349
  confidence_output = gr.Textbox(
350
- label="Confidence Score"
 
351
  )
352
-
353
  time_output = gr.Textbox(
354
- label="Inference Time"
 
355
  )
356
 
357
  generate_btn.click(
@@ -429,7 +438,8 @@ with gr.Blocks(
429
 
430
  gr.Dataframe(
431
  value=metrics_df,
432
- interactive=False
 
433
  )
434
 
435
  demo.launch()
 
97
  .gradio-container {
98
  max-width: 1400px !important;
99
  margin: auto;
100
+ padding-left: 10px !important;
101
+ padding-right: 10px !important;
102
  }
103
 
104
  footer {
 
112
  margin-bottom:10px;
113
  }
114
 
115
+ @media (max-width: 768px) {
116
+
117
+ .main-title {
118
+ font-size:28px !important;
119
+ line-height:1.2 !important;
120
+ }
121
+
122
+ .gradio-container {
123
+ padding-left:5px !important;
124
+ padding-right:5px !important;
125
+ }
126
  }
127
  """
128
 
 
297
 
298
  with gr.Tab("🖼️ Generate"):
299
 
300
+ with gr.Row(equal_height=True):
301
+
302
  image_input = gr.Image(
303
+ sources=["upload", "webcam"],
 
 
 
304
  type="pil",
305
+ label="Input Image",
306
+ height=350
307
  )
308
+
309
  image_output = gr.Image(
310
+ label="Original Image",
311
+ height=350
312
  )
313
 
314
  task_dropdown = gr.Dropdown(
 
351
  lines=5
352
  )
353
 
354
+ with gr.Row(equal_height=True):
355
+
356
  confidence_output = gr.Textbox(
357
+ label="Confidence Score",
358
+ scale=1
359
  )
360
+
361
  time_output = gr.Textbox(
362
+ label="Inference Time",
363
+ scale=1
364
  )
365
 
366
  generate_btn.click(
 
438
 
439
  gr.Dataframe(
440
  value=metrics_df,
441
+ interactive=False,
442
+ wrap=True
443
  )
444
 
445
  demo.launch()