Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,4 @@
|
|
1 |
import torch
|
2 |
-
import spaces
|
3 |
|
4 |
from transformers import AutoModelForCausalLM, AutoTokenizer, TextIteratorStreamer
|
5 |
import gradio as gr
|
@@ -35,7 +34,8 @@ model = AutoModelForCausalLM.from_pretrained(
|
|
35 |
torch_dtype=torch.bfloat16,
|
36 |
).to(device)
|
37 |
|
38 |
-
|
|
|
39 |
def stream_chat(
|
40 |
message: str,
|
41 |
history: list,
|
|
|
1 |
import torch
|
|
|
2 |
|
3 |
from transformers import AutoModelForCausalLM, AutoTokenizer, TextIteratorStreamer
|
4 |
import gradio as gr
|
|
|
34 |
torch_dtype=torch.bfloat16,
|
35 |
).to(device)
|
36 |
|
37 |
+
model = torch.compile(model)
|
38 |
+
|
39 |
def stream_chat(
|
40 |
message: str,
|
41 |
history: list,
|