Spaces:
Runtime error
Runtime error
fetch model
Browse files
app.py
CHANGED
|
@@ -59,6 +59,7 @@ if __name__ == "__main__":
|
|
| 59 |
tokenizer = AutoTokenizer.from_pretrained("stabilityai/stable-code-instruct-3b")
|
| 60 |
model = AutoModelForCausalLM.from_pretrained("stabilityai/stable-code-instruct-3b")
|
| 61 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
|
|
|
| 62 |
model = model.to(device)
|
| 63 |
gr.ChatInterface(
|
| 64 |
predict,
|
|
|
|
| 59 |
tokenizer = AutoTokenizer.from_pretrained("stabilityai/stable-code-instruct-3b")
|
| 60 |
model = AutoModelForCausalLM.from_pretrained("stabilityai/stable-code-instruct-3b")
|
| 61 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
| 62 |
+
model = model.half()
|
| 63 |
model = model.to(device)
|
| 64 |
gr.ChatInterface(
|
| 65 |
predict,
|