Rafa-bork commited on
Commit
b60a2aa
·
1 Parent(s): bc59120
Files changed (1) hide show
  1. app.py +10 -9
app.py CHANGED
@@ -123,6 +123,7 @@ with gr.Blocks() as demo:
123
  examples=[os.path.join("examples", f) for f in os.listdir("examples") if f.lower().endswith((".jpg", ".jpeg", ".png"))],
124
  inputs=image_input,
125
  label="Example Images",
 
126
  elem_id="custom-example-gallery"
127
  )
128
 
@@ -134,15 +135,15 @@ with gr.Blocks() as demo:
134
  label_output = gr.Label(label="Prediction Probabilities")
135
  final_output = gr.Textbox(label="Final Prediction", interactive=False)
136
 
137
- gr.HTML("""
138
- <style>
139
- #custom-example-gallery img {
140
- width: 150px !important;
141
- height: 150px !important;
142
- object-fit: cover !important;
143
- }
144
- </style>
145
- """)
146
 
147
  load_button.click(fn=load_model, inputs=model_selector, outputs=load_output)
148
  predict_button.click(fn=predict, inputs=image_input, outputs=[label_output, final_output])
 
123
  examples=[os.path.join("examples", f) for f in os.listdir("examples") if f.lower().endswith((".jpg", ".jpeg", ".png"))],
124
  inputs=image_input,
125
  label="Example Images",
126
+ examples_per_page=9,
127
  elem_id="custom-example-gallery"
128
  )
129
 
 
135
  label_output = gr.Label(label="Prediction Probabilities")
136
  final_output = gr.Textbox(label="Final Prediction", interactive=False)
137
 
138
+ gr.HTML("""
139
+ <style>
140
+ #custom-example-gallery img {
141
+ width: 150px !important;
142
+ height: 150px !important;
143
+ object-fit: cover !important;
144
+ }
145
+ </style>
146
+ """)
147
 
148
  load_button.click(fn=load_model, inputs=model_selector, outputs=load_output)
149
  predict_button.click(fn=predict, inputs=image_input, outputs=[label_output, final_output])