muhammadsalmanalfaridzi commited on
Commit
756b166
·
verified ·
1 Parent(s): 5f0c190

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -3
app.py CHANGED
@@ -60,13 +60,21 @@ iface = gr.Interface(
60
  fn=detect_objects, # Fungsi yang dipanggil saat gambar diupload
61
  inputs=gr.Image(type="pil", label="Input Image"), # Ganti label input
62
  outputs=[gr.Image(label="Detect Object"), gr.Textbox(label="Counting Object")], # Ganti label output
63
- live=True # Menampilkan hasil secara langsung
 
 
 
 
 
 
 
 
64
  )
65
 
66
  # Membungkus input dan output dalam gr.Row() untuk layout berdampingan
67
  iface.layout = gr.Row(
68
- iface.inputs, # Input image component
69
- iface.outputs # Output components (image and text)
70
  )
71
 
72
  # Menjalankan antarmuka
 
60
  fn=detect_objects, # Fungsi yang dipanggil saat gambar diupload
61
  inputs=gr.Image(type="pil", label="Input Image"), # Ganti label input
62
  outputs=[gr.Image(label="Detect Object"), gr.Textbox(label="Counting Object")], # Ganti label output
63
+ live=True, # Menampilkan hasil secara langsung
64
+ )
65
+
66
+ # Membungkus input dan output dalam gr.Row() untuk layout berdampingan
67
+ iface = gr.Interface(
68
+ fn=detect_objects,
69
+ inputs=gr.Image(type="pil", label="Input Image"), # Label input
70
+ outputs=[gr.Image(label="Detect Object"), gr.Textbox(label="Counting Object")], # Label output
71
+ live=True
72
  )
73
 
74
  # Membungkus input dan output dalam gr.Row() untuk layout berdampingan
75
  iface.layout = gr.Row(
76
+ gr.Column(iface.inputs), # Input image component
77
+ gr.Column(iface.outputs) # Output components (image and text)
78
  )
79
 
80
  # Menjalankan antarmuka