Huiwenshi commited on
Commit
e4a3f19
1 Parent(s): 7c68ae4

Upload app_hg.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app_hg.py +6 -5
app_hg.py CHANGED
@@ -39,6 +39,8 @@ from infer import seed_everything, save_gif
39
  from infer import Text2Image, Removebg, Image2Views, Views2Mesh, GifRenderer
40
  from third_party.check import check_bake_available
41
 
 
 
42
  try:
43
  from third_party.mesh_baker import MeshBaker
44
  BAKE_AVAILEBLE = True
@@ -47,7 +49,8 @@ except Exception as err:
47
  print("import baking related fail, run without baking")
48
  check_bake_available()
49
  BAKE_AVAILEBLE = False
50
-
 
51
  warnings.simplefilter('ignore', category=UserWarning)
52
  warnings.simplefilter('ignore', category=FutureWarning)
53
  warnings.simplefilter('ignore', category=DeprecationWarning)
@@ -93,8 +96,6 @@ def download_models():
93
  except Exception as e:
94
  print(f"Error downloading DUSt3R: {e}")
95
 
96
- download_models()
97
-
98
  ################################################################
99
  # initial setting
100
  ################################################################
@@ -483,6 +484,6 @@ with gr.Blocks() as demo:
483
  # start gradio server
484
  #===============================================================
485
 
486
- demo.queue(max_size=CONST_MAX_QUEUE)
487
- demo.launch(server_name=CONST_SERVER, server_port=CONST_PORT)
488
 
 
39
  from infer import Text2Image, Removebg, Image2Views, Views2Mesh, GifRenderer
40
  from third_party.check import check_bake_available
41
 
42
+ download_models()
43
+
44
  try:
45
  from third_party.mesh_baker import MeshBaker
46
  BAKE_AVAILEBLE = True
 
49
  print("import baking related fail, run without baking")
50
  check_bake_available()
51
  BAKE_AVAILEBLE = False
52
+
53
+
54
  warnings.simplefilter('ignore', category=UserWarning)
55
  warnings.simplefilter('ignore', category=FutureWarning)
56
  warnings.simplefilter('ignore', category=DeprecationWarning)
 
96
  except Exception as e:
97
  print(f"Error downloading DUSt3R: {e}")
98
 
 
 
99
  ################################################################
100
  # initial setting
101
  ################################################################
 
484
  # start gradio server
485
  #===============================================================
486
 
487
+ demo.queue()
488
+ demo.launch()
489