akhaliq HF staff SivilTaram commited on
Commit
0be3840
1 Parent(s): f7bec14

Create app_sailor.py (#22)

Browse files

- Create app_sailor.py (a5809e5095a3fffa0ada6d288509004ed94f3b4c)


Co-authored-by: Qian Liu <SivilTaram@users.noreply.huggingface.co>

Files changed (1) hide show
  1. app_sailor.py +12 -0
app_sailor.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
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
10
+
11
+ if __name__ == "__main__":
12
+ demo.launch()