Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
import os
|
2 |
import time
|
3 |
-
|
4 |
import torch
|
5 |
from transformers import AutoModelForCausalLM, AutoTokenizer, TextIteratorStreamer, BitsAndBytesConfig
|
6 |
import gradio as gr
|
@@ -46,7 +46,7 @@ model = AutoModelForCausalLM.from_pretrained(
|
|
46 |
device_map="auto",
|
47 |
quantization_config=quantization_config)
|
48 |
|
49 |
-
|
50 |
def stream_chat(
|
51 |
message: str,
|
52 |
history: list,
|
|
|
1 |
import os
|
2 |
import time
|
3 |
+
import spaces
|
4 |
import torch
|
5 |
from transformers import AutoModelForCausalLM, AutoTokenizer, TextIteratorStreamer, BitsAndBytesConfig
|
6 |
import gradio as gr
|
|
|
46 |
device_map="auto",
|
47 |
quantization_config=quantization_config)
|
48 |
|
49 |
+
@spaces.GPU()
|
50 |
def stream_chat(
|
51 |
message: str,
|
52 |
history: list,
|