Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -14,8 +14,8 @@ DESCRIPTION = "# Arcee Model Testing - current test: arcee-ai/SEC-Calme-7B-Instr
|
|
| 14 |
if not torch.cuda.is_available():
|
| 15 |
DESCRIPTION += "\n<p>Running on CPU 🥶 This demo does not work on CPU.</p>"
|
| 16 |
|
| 17 |
-
MAX_MAX_NEW_TOKENS =
|
| 18 |
-
DEFAULT_MAX_NEW_TOKENS =
|
| 19 |
MAX_INPUT_TOKEN_LENGTH = int(os.getenv("MAX_INPUT_TOKEN_LENGTH", "4096"))
|
| 20 |
|
| 21 |
if torch.cuda.is_available():
|
|
@@ -28,7 +28,7 @@ if torch.cuda.is_available():
|
|
| 28 |
def generate(
|
| 29 |
message: str,
|
| 30 |
chat_history: list[tuple[str, str]],
|
| 31 |
-
max_new_tokens: int =
|
| 32 |
temperature: float = 0.6,
|
| 33 |
top_p: float = 0.9,
|
| 34 |
top_k: int = 50,
|
|
|
|
| 14 |
if not torch.cuda.is_available():
|
| 15 |
DESCRIPTION += "\n<p>Running on CPU 🥶 This demo does not work on CPU.</p>"
|
| 16 |
|
| 17 |
+
MAX_MAX_NEW_TOKENS = 4096
|
| 18 |
+
DEFAULT_MAX_NEW_TOKENS = 4096
|
| 19 |
MAX_INPUT_TOKEN_LENGTH = int(os.getenv("MAX_INPUT_TOKEN_LENGTH", "4096"))
|
| 20 |
|
| 21 |
if torch.cuda.is_available():
|
|
|
|
| 28 |
def generate(
|
| 29 |
message: str,
|
| 30 |
chat_history: list[tuple[str, str]],
|
| 31 |
+
max_new_tokens: int = 4096,
|
| 32 |
temperature: float = 0.6,
|
| 33 |
top_p: float = 0.9,
|
| 34 |
top_k: int = 50,
|