Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
SivilTaram
commited on
Commit
•
a5809e5
1
Parent(s):
f7bec14
Create app_sailor.py
Browse files- 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()
|