Spaces:
Runtime error
Runtime error
chienweichang
commited on
Commit
•
840fcf3
1
Parent(s):
08f75e5
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import os
|
2 |
+
os.system("pip uninstall -y gradio")
|
3 |
+
os.system("pip install gradio==3.43.0")
|
4 |
+
|
5 |
+
from lmdeploy.serve.gradio.turbomind_coupled import run_local
|
6 |
+
from lmdeploy.messages import TurbomindEngineConfig
|
7 |
+
|
8 |
+
backend_config = TurbomindEngineConfig(max_batch_size=1, cache_max_entry_count=0.05)
|
9 |
+
model_path = 'yentinglin/Llama-3-Taiwan-8B-Instruct'
|
10 |
+
run_local(model_path, backend_config=backend_config, server_name="huggingface-space")
|