akhaliq HF staff commited on
Commit
d14e17c
1 Parent(s): 166d5a5
Files changed (2) hide show
  1. app_sailor.py +3 -4
  2. app_showui.py +0 -3
app_sailor.py CHANGED
@@ -1,10 +1,9 @@
1
  import gradio as gr
2
  import spaces
 
3
 
4
- demo = gr.load(name="sail/Sailor2-20B-Chat", src="spaces")
 
5
 
6
  for fn in demo.fns.values():
7
  fn.api_name = False
8
-
9
- if __name__ == "__main__":
10
- demo.launch()
 
1
  import gradio as gr
2
  import spaces
3
+ import transformers_gradio
4
 
5
+ demo = gr.load(name="sail/Sailor2-20B-Chat", src=transformers_gradio.registry)
6
+ demo.fn = spaces.GPU()(demo.fn)
7
 
8
  for fn in demo.fns.values():
9
  fn.api_name = False
 
 
 
app_showui.py CHANGED
@@ -8,6 +8,3 @@ demo = gr.load(name="showlab/ShowUI", src="spaces")
8
  if hasattr(demo, 'fns'):
9
  for fn in demo.fns.values():
10
  fn.api_name = False
11
-
12
- if __name__ == "__main__":
13
- demo.launch()
 
8
  if hasattr(demo, 'fns'):
9
  for fn in demo.fns.values():
10
  fn.api_name = False