Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -3,7 +3,7 @@ from threading import Thread
|
|
3 |
from typing import Iterator
|
4 |
|
5 |
import gradio as gr
|
6 |
-
|
7 |
import torch
|
8 |
from transformers import AutoModelForCausalLM, GemmaTokenizerFast, TextIteratorStreamer
|
9 |
|
@@ -24,7 +24,7 @@ model.config.sliding_window = 4096
|
|
24 |
model.eval()
|
25 |
|
26 |
|
27 |
-
|
28 |
def generate(
|
29 |
message: str,
|
30 |
chat_history: list[tuple[str, str]],
|
|
|
3 |
from typing import Iterator
|
4 |
|
5 |
import gradio as gr
|
6 |
+
import spaces
|
7 |
import torch
|
8 |
from transformers import AutoModelForCausalLM, GemmaTokenizerFast, TextIteratorStreamer
|
9 |
|
|
|
24 |
model.eval()
|
25 |
|
26 |
|
27 |
+
@spaces.GPU(duration=90)
|
28 |
def generate(
|
29 |
message: str,
|
30 |
chat_history: list[tuple[str, str]],
|