Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -60,14 +60,14 @@ def predict(message, history, system_prompt, temperature, max_tokens):
|
|
60 |
|
61 |
if __name__ == "__main__":
|
62 |
args = parse_args()
|
63 |
-
tokenizer = AutoTokenizer.from_pretrained("stabilityai/stablelm-2-chat", trust_remote_code=True)
|
64 |
-
model = AutoModelForCausalLM.from_pretrained("stabilityai/stablelm-2-chat", trust_remote_code=True, torch_dtype=torch.bfloat16)
|
65 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
66 |
model = model.to(device)
|
67 |
gr.ChatInterface(
|
68 |
predict,
|
69 |
-
title="StableLM 2 Chat - Demo",
|
70 |
-
description="StableLM 2 Chat - StabilityAI",
|
71 |
theme="soft",
|
72 |
chatbot=gr.Chatbot(label="Chat History",),
|
73 |
textbox=gr.Textbox(placeholder="input", container=False, scale=7),
|
|
|
60 |
|
61 |
if __name__ == "__main__":
|
62 |
args = parse_args()
|
63 |
+
tokenizer = AutoTokenizer.from_pretrained("stabilityai/stablelm-2-12b-chat", trust_remote_code=True)
|
64 |
+
model = AutoModelForCausalLM.from_pretrained("stabilityai/stablelm-2-12b-chat", trust_remote_code=True, torch_dtype=torch.bfloat16)
|
65 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
66 |
model = model.to(device)
|
67 |
gr.ChatInterface(
|
68 |
predict,
|
69 |
+
title="StableLM 2 12B Chat - Demo",
|
70 |
+
description="StableLM 2 12B Chat - StabilityAI",
|
71 |
theme="soft",
|
72 |
chatbot=gr.Chatbot(label="Chat History",),
|
73 |
textbox=gr.Textbox(placeholder="input", container=False, scale=7),
|