PeiqingYang commited on
Commit
6b3879a
·
1 Parent(s): dcc8c59

compress assets

Browse files
Files changed (1) hide show
  1. hugging_face/app.py +8 -11
hugging_face/app.py CHANGED
@@ -416,15 +416,12 @@ matanyone_processor = InferenceCore(matanyone_model, cfg=matanyone_model.cfg)
416
  # download test samples
417
  media_url = "https://github.com/pq-yang/MatAnyone/releases/download/media/"
418
  test_sample_path = os.path.join('/home/user/app/hugging_face/', "test_sample/")
419
- load_file_from_url(os.path.join(media_url, 'test-sample0.mp4'), test_sample_path)
420
- load_file_from_url(os.path.join(media_url, 'test-sample1.mp4'), test_sample_path)
421
- load_file_from_url(os.path.join(media_url, 'test-sample2.mp4'), test_sample_path)
422
- load_file_from_url(os.path.join(media_url, 'test-sample3.mp4'), test_sample_path)
423
- load_file_from_url(os.path.join(media_url, 'test-sample4.mp4'), test_sample_path)
424
- load_file_from_url(os.path.join(media_url, 'test-sample5.mp4'), test_sample_path)
425
- load_file_from_url(os.path.join(media_url, 'test-sample6.mp4'), test_sample_path)
426
- load_file_from_url(os.path.join(media_url, 'test-sample0.png'), test_sample_path)
427
- load_file_from_url(os.path.join(media_url, 'test-sample1.png'), test_sample_path)
428
 
429
  # download assets
430
  assets_path = os.path.join('/home/user/app/hugging_face/', "assets/")
@@ -761,7 +758,7 @@ with gr.Blocks(theme=gr.themes.Monochrome(), css=my_custom_css) as demo:
761
  gr.Markdown("---")
762
  gr.Markdown("## Examples")
763
  gr.Examples(
764
- examples=[os.path.join(os.path.dirname(__file__), "./test_sample/", test_sample) for test_sample in ["test-sample0.mp4", "test-sample1.mp4", "test-sample2.mp4", "test-sample3.mp4", "test-sample4.mp4", "test-sample5.mp4", "test-sample6.mp4"]],
765
  inputs=[video_input],
766
  )
767
 
@@ -957,7 +954,7 @@ with gr.Blocks(theme=gr.themes.Monochrome(), css=my_custom_css) as demo:
957
  gr.Markdown("---")
958
  gr.Markdown("## Examples")
959
  gr.Examples(
960
- examples=[os.path.join(os.path.dirname(__file__), "./test_sample/", test_sample) for test_sample in ["test-sample0.png", "test-sample1.png"]],
961
  inputs=[image_input],
962
  )
963
 
 
416
  # download test samples
417
  media_url = "https://github.com/pq-yang/MatAnyone/releases/download/media/"
418
  test_sample_path = os.path.join('/home/user/app/hugging_face/', "test_sample/")
419
+ load_file_from_url(os.path.join(media_url, 'test-sample0-720p.mp4'), test_sample_path)
420
+ load_file_from_url(os.path.join(media_url, 'test-sample1-720p.mp4'), test_sample_path)
421
+ load_file_from_url(os.path.join(media_url, 'test-sample2-720p.mp4'), test_sample_path)
422
+ load_file_from_url(os.path.join(media_url, 'test-sample3-720p.mp4'), test_sample_path)
423
+ load_file_from_url(os.path.join(media_url, 'test-sample0.jpg'), test_sample_path)
424
+ load_file_from_url(os.path.join(media_url, 'test-sample1.jpg'), test_sample_path)
 
 
 
425
 
426
  # download assets
427
  assets_path = os.path.join('/home/user/app/hugging_face/', "assets/")
 
758
  gr.Markdown("---")
759
  gr.Markdown("## Examples")
760
  gr.Examples(
761
+ examples=[os.path.join(os.path.dirname(__file__), "./test_sample/", test_sample) for test_sample in ["test-sample0-720p.mp4", "test-sample1-720p.mp4", "test-sample2-720p.mp4", "test-sample3-720p.mp4"]],
762
  inputs=[video_input],
763
  )
764
 
 
954
  gr.Markdown("---")
955
  gr.Markdown("## Examples")
956
  gr.Examples(
957
+ examples=[os.path.join(os.path.dirname(__file__), "./test_sample/", test_sample) for test_sample in ["test-sample0.jpg", "test-sample1.jpg"]],
958
  inputs=[image_input],
959
  )
960