baudm commited on
Commit
bd3c86d
1 Parent(s): 48c25e4

Fix paths of demo images

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -13,7 +13,7 @@
13
  # See the License for the specific language governing permissions and
14
  # limitations under the License.
15
 
16
- from pathlib import Path
17
 
18
  import torch
19
  from torchvision import transforms as T
@@ -79,8 +79,7 @@ def main():
79
 
80
  output = gr.Textbox(max_lines=1, label='Model output')
81
 
82
- demo_images = Path(__file__).parent.joinpath('demo_images').glob('*.*')
83
- gr.Examples([str(p) for p in demo_images], inputs=image_upload)
84
 
85
  read_upload.click(app, inputs=[model_name, image_upload], outputs=output)
86
  read_canvas.click(app, inputs=[model_name, image_canvas], outputs=output)
 
13
  # See the License for the specific language governing permissions and
14
  # limitations under the License.
15
 
16
+ import glob
17
 
18
  import torch
19
  from torchvision import transforms as T
 
79
 
80
  output = gr.Textbox(max_lines=1, label='Model output')
81
 
82
+ gr.Examples(glob.glob('demo_images/*.*'), inputs=image_upload)
 
83
 
84
  read_upload.click(app, inputs=[model_name, image_upload], outputs=output)
85
  read_canvas.click(app, inputs=[model_name, image_canvas], outputs=output)