Spaces:
Running
on
Zero
Running
on
Zero
BramVanroy
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ from threading import Thread
|
|
5 |
from typing import Iterator
|
6 |
|
7 |
import gradio as gr
|
8 |
-
import spaces
|
9 |
import torch
|
10 |
from transformers import AutoModelForCausalLM, AutoTokenizer, TextIteratorStreamer
|
11 |
|
@@ -19,7 +19,7 @@ if torch.cuda.is_available():
|
|
19 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
20 |
|
21 |
|
22 |
-
@spaces.GPU
|
23 |
def generate(
|
24 |
message: str,
|
25 |
chat_history: list[tuple[str, str]],
|
|
|
5 |
from typing import Iterator
|
6 |
|
7 |
import gradio as gr
|
8 |
+
# import spaces
|
9 |
import torch
|
10 |
from transformers import AutoModelForCausalLM, AutoTokenizer, TextIteratorStreamer
|
11 |
|
|
|
19 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
20 |
|
21 |
|
22 |
+
# @spaces.GPU
|
23 |
def generate(
|
24 |
message: str,
|
25 |
chat_history: list[tuple[str, str]],
|