Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
|
|
| 1 |
from threading import Thread
|
| 2 |
from typing import Iterator
|
| 3 |
|
|
@@ -29,7 +30,7 @@ LICENSE = """
|
|
| 29 |
if not torch.cuda.is_available():
|
| 30 |
DESCRIPTION += "\n<p>Running on CPU This demo does not work on CPU.</p>"
|
| 31 |
|
| 32 |
-
|
| 33 |
def generate(
|
| 34 |
message: str,
|
| 35 |
chat_history: list[tuple[str, str]],
|
|
|
|
| 1 |
+
import os
|
| 2 |
from threading import Thread
|
| 3 |
from typing import Iterator
|
| 4 |
|
|
|
|
| 30 |
if not torch.cuda.is_available():
|
| 31 |
DESCRIPTION += "\n<p>Running on CPU This demo does not work on CPU.</p>"
|
| 32 |
|
| 33 |
+
@spaces.GPU(duration=120)
|
| 34 |
def generate(
|
| 35 |
message: str,
|
| 36 |
chat_history: list[tuple[str, str]],
|