Spaces:
Paused
Paused
Update
Browse files
app.py
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
from threading import Thread
|
2 |
from typing import Iterator
|
3 |
|
@@ -8,7 +9,7 @@ from transformers import AutoModelForCausalLM, AutoTokenizer, TextIteratorStream
|
|
8 |
|
9 |
MAX_MAX_NEW_TOKENS = 2048
|
10 |
DEFAULT_MAX_NEW_TOKENS = 1024
|
11 |
-
MAX_INPUT_TOKEN_LENGTH = 4096
|
12 |
|
13 |
DESCRIPTION = """\
|
14 |
# Llama-2 7B Chat
|
|
|
1 |
+
import os
|
2 |
from threading import Thread
|
3 |
from typing import Iterator
|
4 |
|
|
|
9 |
|
10 |
MAX_MAX_NEW_TOKENS = 2048
|
11 |
DEFAULT_MAX_NEW_TOKENS = 1024
|
12 |
+
MAX_INPUT_TOKEN_LENGTH = int(os.getenv("MAX_INPUT_TOKEN_LENGTH", "4096"))
|
13 |
|
14 |
DESCRIPTION = """\
|
15 |
# Llama-2 7B Chat
|