Nan Xue commited on
Commit
21db24d
·
1 Parent(s): 538e694
gradio_demo/inference.py → app.py RENAMED
@@ -126,7 +126,7 @@ def process_image(
126
 
127
  return result_image[:, :, ::-1], json_file, fig_file
128
 
129
-
130
  def run_demo():
131
  """create the Gradio demo interface"""
132
  css = """
@@ -248,5 +248,4 @@ def run_demo():
248
 
249
  return demo
250
 
251
- if __name__ == "__main__":
252
- run_demo().launch()
 
126
 
127
  return result_image[:, :, ::-1], json_file, fig_file
128
 
129
+ @spaces.GPU()
130
  def run_demo():
131
  """create the Gradio demo interface"""
132
  css = """
 
248
 
249
  return demo
250
 
251
+ run_demo().launch()