Huiwenshi commited on
Commit
a6c0cd7
Β·
verified Β·
1 Parent(s): 10e7dfd

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. .gitignore +2 -2
  2. hg_app.py +4 -4
.gitignore CHANGED
@@ -159,10 +159,10 @@ dmypy.json
159
 
160
  # Cython debug symbols
161
  cython_debug/
162
-
163
  # PyCharm
164
  # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
165
  # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
166
  # and can be added to the global gitignore or merged into this file. For a more nuclear
167
  # option (not recommended) you can uncomment the following to ignore the entire idea folder.
168
- #.idea/
 
159
 
160
  # Cython debug symbols
161
  cython_debug/
162
+ gradio_cache/
163
  # PyCharm
164
  # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
165
  # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
166
  # and can be added to the global gitignore or merged into this file. For a more nuclear
167
  # option (not recommended) you can uncomment the following to ignore the entire idea folder.
168
+ #.idea/
hg_app.py CHANGED
@@ -111,7 +111,7 @@ def build_model_viewer_html(save_folder, height=660, width=790, textured=False):
111
  </div>
112
  """
113
 
114
- @spaces.GPU(duration=60)
115
  def _gen_shape(
116
  caption,
117
  image,
@@ -170,7 +170,7 @@ def _gen_shape(
170
  stats['time'] = time_meta
171
  return mesh, save_folder, image
172
 
173
- @spaces.GPU(duration=90)
174
  def generation_all(
175
  caption,
176
  image,
@@ -203,7 +203,7 @@ def generation_all(
203
  model_viewer_html_textured,
204
  )
205
 
206
- @spaces.GPU(duration=60)
207
  def shape_generation(
208
  caption,
209
  image,
@@ -418,6 +418,6 @@ if __name__ == '__main__':
418
  app.mount("/static", StaticFiles(directory=static_dir), name="static")
419
 
420
  demo = build_app()
421
- demo.queue(max_size=3)
422
  app = gr.mount_gradio_app(app, demo, path="/")
423
  uvicorn.run(app, host=IP, port=PORT)
 
111
  </div>
112
  """
113
 
114
+ @spaces.GPU(duration=100)
115
  def _gen_shape(
116
  caption,
117
  image,
 
170
  stats['time'] = time_meta
171
  return mesh, save_folder, image
172
 
173
+ @spaces.GPU(duration=150)
174
  def generation_all(
175
  caption,
176
  image,
 
203
  model_viewer_html_textured,
204
  )
205
 
206
+ @spaces.GPU(duration=100)
207
  def shape_generation(
208
  caption,
209
  image,
 
418
  app.mount("/static", StaticFiles(directory=static_dir), name="static")
419
 
420
  demo = build_app()
421
+ demo.queue(max_size=10)
422
  app = gr.mount_gradio_app(app, demo, path="/")
423
  uvicorn.run(app, host=IP, port=PORT)