Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,7 +4,7 @@ import mdtex2html
|
|
| 4 |
from utils import load_model_on_gpus
|
| 5 |
|
| 6 |
tokenizer = AutoTokenizer.from_pretrained("IPLab/chatglm2-6b-patent-7.30", trust_remote_code=True)
|
| 7 |
-
model = AutoModel.from_pretrained("IPLab/chatglm2-6b-patent-7.30", trust_remote_code=True).
|
| 8 |
# 多显卡支持,使用下面两行代替上面一行,将num_gpus改为你实际的显卡数量
|
| 9 |
# from utils import load_model_on_gpus
|
| 10 |
# model = load_model_on_gpus("THUDM/chatglm2-6b", num_gpus=2)
|
|
@@ -80,7 +80,7 @@ def reset_state():
|
|
| 80 |
|
| 81 |
|
| 82 |
with gr.Blocks() as demo:
|
| 83 |
-
gr.HTML("""<h1 align="center">青云大模型Beta
|
| 84 |
|
| 85 |
chatbot = gr.Chatbot()
|
| 86 |
with gr.Row():
|
|
|
|
| 4 |
from utils import load_model_on_gpus
|
| 5 |
|
| 6 |
tokenizer = AutoTokenizer.from_pretrained("IPLab/chatglm2-6b-patent-7.30", trust_remote_code=True)
|
| 7 |
+
model = AutoModel.from_pretrained("IPLab/chatglm2-6b-patent-7.30", trust_remote_code=True).cuda()
|
| 8 |
# 多显卡支持,使用下面两行代替上面一行,将num_gpus改为你实际的显卡数量
|
| 9 |
# from utils import load_model_on_gpus
|
| 10 |
# model = load_model_on_gpus("THUDM/chatglm2-6b", num_gpus=2)
|
|
|
|
| 80 |
|
| 81 |
|
| 82 |
with gr.Blocks() as demo:
|
| 83 |
+
gr.HTML("""<h1 align="center">青云大模型Beta测试版</h1>""")
|
| 84 |
|
| 85 |
chatbot = gr.Chatbot()
|
| 86 |
with gr.Row():
|