bisoye commited on
Commit
d217887
1 Parent(s): cf79cd0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -12
app.py CHANGED
@@ -2,7 +2,7 @@ import gradio as gr
2
  from main import main
3
 
4
 
5
- with gr.Blocks() as demo:
6
 
7
  with gr.Row():
8
  with gr.Column():
@@ -12,40 +12,40 @@ with gr.Blocks() as demo:
12
  matric_no = gr.Textbox(label='Matric number',
13
  interactive=True,
14
  value='CPE/18/6627')
 
 
 
15
 
16
  with gr.Column():
17
  input_image = gr.Image(type='numpy',
18
  image_mode='RGB',
19
  sources='webcam',
20
  interactive=True,
21
- height=640,
22
- width=640,
23
  label='Webcam Image')
24
 
25
  cropped_input_image = gr.Image(type='pil',
26
  image_mode='RGB',
27
  interactive=False,
28
- height=640,
29
- width=640,
30
  label='Detected face in webcam image')
31
 
32
  with gr.Column(scale=1):
33
  returned_image = gr.Image(type='pil',
34
  image_mode='RGB',
35
  interactive=False,
36
- height=640,
37
- width=640,
38
  label='Image in database')
39
  cropped_returned_image = gr.Image(type='pil',
40
  image_mode='RGB',
41
  interactive=False,
42
- height=640,
43
- width=640,
44
  label='Face in image in database')
45
 
46
- submit_button = gr.Button(value='Submit')
47
- result = gr.Textbox(label='Result',
48
- interactive=False)
49
  submit_button.click(fn = main,
50
  inputs=[last_name, matric_no, input_image],
51
  outputs=[result, cropped_input_image,
 
2
  from main import main
3
 
4
 
5
+ with gr.Blocks(gr.themes.Soft()) as demo:
6
 
7
  with gr.Row():
8
  with gr.Column():
 
12
  matric_no = gr.Textbox(label='Matric number',
13
  interactive=True,
14
  value='CPE/18/6627')
15
+ submit_button = gr.Button(value='Submit')
16
+ result = gr.Textbox(label='Result',
17
+ interactive=False)
18
 
19
  with gr.Column():
20
  input_image = gr.Image(type='numpy',
21
  image_mode='RGB',
22
  sources='webcam',
23
  interactive=True,
24
+ height=480,
25
+ width=480,
26
  label='Webcam Image')
27
 
28
  cropped_input_image = gr.Image(type='pil',
29
  image_mode='RGB',
30
  interactive=False,
31
+ height=480,
32
+ width=480,
33
  label='Detected face in webcam image')
34
 
35
  with gr.Column(scale=1):
36
  returned_image = gr.Image(type='pil',
37
  image_mode='RGB',
38
  interactive=False,
39
+ height=480,
40
+ width=480,
41
  label='Image in database')
42
  cropped_returned_image = gr.Image(type='pil',
43
  image_mode='RGB',
44
  interactive=False,
45
+ height=480,
46
+ width=480,
47
  label='Face in image in database')
48
 
 
 
 
49
  submit_button.click(fn = main,
50
  inputs=[last_name, matric_no, input_image],
51
  outputs=[result, cropped_input_image,