Fix the bug that openxlab platform cannot be deployed. (#187)

This PR adds `python download_model.py {model_name_path}` before using streamlit to deploy the model
This commit is contained in:
HongCheng 2024-04-13 10:09:43 +09:00 committed by GitHub
commit 889d86bc0d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

14
app.py
View File

@ -1,3 +1,13 @@
import os import os
os.system('streamlit run web_internlm2.py --server.address=0.0.0.0 --server.port 7860')
#os.system('streamlit run web_demo-aiwei.py --server.address=0.0.0.0 --server.port 7860') #model = "EmoLLM_aiwei"
model = "EmoLLM_Model"
if model == "EmoLLM_aiwei":
os.system("python download_model.py ajupyter/EmoLLM_aiwei")
os.system('streamlit run web_demo-aiwei.py --server.address=0.0.0.0 --server.port 7860')
elif model == "EmoLLM_Model":
os.system("python download_model.py jujimeizuo/EmoLLM_Model")
os.system('streamlit run web_internlm2.py --server.address=0.0.0.0 --server.port 7860')
else:
print("Please select one model")