ezamorag commited on
Commit
b921f3c
·
1 Parent(s): b653185

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -2,6 +2,7 @@ from PIL import Image, ImageDraw, ImageFont
2
  from dotenv import load_dotenv
3
  import matplotlib.pyplot as plt
4
  from io import BytesIO
 
5
  import gradio as gr
6
  import numpy as np
7
  import requests
@@ -146,7 +147,6 @@ with gr.Blocks() as demo:
146
  output1 =[gr.Image().style(height=500, width=500), gr.Textbox(lines=20)]
147
  button1 = gr.Button("Submit")
148
  button1.click(testing_countingid, input1, output1)
149
- examples = gr.Examples(examples=["img_examples/exs00004.jpg", "img_examples/exs00049.jpg"],inputs=[input1])
150
 
151
  with gr.Tab("Simplified Scientific Name Count"):
152
  with gr.Row():
@@ -161,6 +161,8 @@ with gr.Blocks() as demo:
161
  output3 = gr.Video()
162
  button3 = gr.Button("Submit")
163
  button3.click(video_identity, input3, output3)
 
 
164
 
165
  """ with gr.Tab("Direct insect counter"):
166
  with gr.Row():
 
2
  from dotenv import load_dotenv
3
  import matplotlib.pyplot as plt
4
  from io import BytesIO
5
+ from glob import glob
6
  import gradio as gr
7
  import numpy as np
8
  import requests
 
147
  output1 =[gr.Image().style(height=500, width=500), gr.Textbox(lines=20)]
148
  button1 = gr.Button("Submit")
149
  button1.click(testing_countingid, input1, output1)
 
150
 
151
  with gr.Tab("Simplified Scientific Name Count"):
152
  with gr.Row():
 
161
  output3 = gr.Video()
162
  button3 = gr.Button("Submit")
163
  button3.click(video_identity, input3, output3)
164
+ examples_list = glob("img_examples/*.jpg")
165
+ examples = gr.Examples(examples=examples_list,inputs=[input1])
166
 
167
  """ with gr.Tab("Direct insect counter"):
168
  with gr.Row():