Update app.py
Browse files131 unmodified lines132133134135136137138131 unmodified linesclient = InferenceClient(model, token=huggingface_token)# Calculate input tokens (this is an approximation, you might need a more accurate method)input_tokens = len(prompt.split()) // 3# Get the token limit for the current modelmodel_token_limit = MODEL_TOKEN_LIMITS.get(model, 8192) # Default to 8192 if model not found131 unmodified lines132133134135136137138131 unmodified linesclient = InferenceClient(model, token=huggingface_token)# Calculate input tokens (this is an approximation, you might need a more accurate method)input_tokens = len(prompt.split()) // 4# Get the token limit for the current modelmodel_token_limit = MODEL_TOKEN_LIMITS.get(model, 8192) # Default to 8192 if model not found
app.py+1-1