Spaces:
Configuration error
Configuration error
Update
Browse files
app.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
|
|
| 1 |
from threading import Thread
|
| 2 |
from typing import Iterator
|
| 3 |
|
|
@@ -13,7 +14,7 @@ from transformers import AutoModelForCausalLM, AutoTokenizer, TextIteratorStream
|
|
| 13 |
|
| 14 |
MAX_MAX_NEW_TOKENS = 2048
|
| 15 |
DEFAULT_MAX_NEW_TOKENS = 1024
|
| 16 |
-
MAX_INPUT_TOKEN_LENGTH = 4096
|
| 17 |
|
| 18 |
DESCRIPTION = """\
|
| 19 |
# Llama-2 13B Chat
|
|
|
|
| 1 |
+
import os
|
| 2 |
from threading import Thread
|
| 3 |
from typing import Iterator
|
| 4 |
|
|
|
|
| 14 |
|
| 15 |
MAX_MAX_NEW_TOKENS = 2048
|
| 16 |
DEFAULT_MAX_NEW_TOKENS = 1024
|
| 17 |
+
MAX_INPUT_TOKEN_LENGTH = int(os.getenv("MAX_INPUT_TOKEN_LENGTH", "4096"))
|
| 18 |
|
| 19 |
DESCRIPTION = """\
|
| 20 |
# Llama-2 13B Chat
|