BenBranyon commited on
Commit
22039c7
1 Parent(s): 5432431

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -1,3 +1,4 @@
 
1
  from threading import Thread
2
  from typing import Iterator
3
 
@@ -7,6 +8,10 @@ import torch
7
  from huggingface_hub import InferenceClient
8
  from transformers import AutoModelForCausalLM, AutoTokenizer, TextIteratorStreamer
9
 
 
 
 
 
10
  #Inference API Code
11
  client = InferenceClient("BenBranyon/zephyr-sumbot-all-songs")
12
 
 
1
+ import os
2
  from threading import Thread
3
  from typing import Iterator
4
 
 
8
  from huggingface_hub import InferenceClient
9
  from transformers import AutoModelForCausalLM, AutoTokenizer, TextIteratorStreamer
10
 
11
+ MAX_MAX_NEW_TOKENS = 2048
12
+ DEFAULT_MAX_NEW_TOKENS = 1024
13
+ MAX_INPUT_TOKEN_LENGTH = int(os.getenv("MAX_INPUT_TOKEN_LENGTH", "4096"))
14
+
15
  #Inference API Code
16
  client = InferenceClient("BenBranyon/zephyr-sumbot-all-songs")
17