Spaces:
Running
on
A10G
Running
on
A10G
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
import torch
|
|
|
2 |
|
3 |
from transformers import AutoModelForCausalLM, AutoTokenizer, TextIteratorStreamer
|
4 |
import gradio as gr
|
@@ -38,6 +39,7 @@ if device == "cuda":
|
|
38 |
model = torch.compile(model)
|
39 |
|
40 |
|
|
|
41 |
def stream_chat(
|
42 |
message: str,
|
43 |
history: list,
|
|
|
1 |
import torch
|
2 |
+
import spaces
|
3 |
|
4 |
from transformers import AutoModelForCausalLM, AutoTokenizer, TextIteratorStreamer
|
5 |
import gradio as gr
|
|
|
39 |
model = torch.compile(model)
|
40 |
|
41 |
|
42 |
+
@spaces.GPU
|
43 |
def stream_chat(
|
44 |
message: str,
|
45 |
history: list,
|