khurrameycon commited on
Commit
498ae97
·
verified ·
1 Parent(s): dfc83ca

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -103,7 +103,7 @@ from safetensors.torch import load_file
103
 
104
  class ModelInput(BaseModel):
105
  prompt: str
106
- max_new_tokens: int = 50
107
 
108
  app = FastAPI()
109
 
@@ -144,7 +144,7 @@ except Exception as e:
144
  print(f"Error during model loading: {e}")
145
  raise
146
 
147
- def generate_response(model, tokenizer, instruction, max_new_tokens=128):
148
  """Generate a response from the model based on an instruction."""
149
  try:
150
  # Format input for the model
 
103
 
104
  class ModelInput(BaseModel):
105
  prompt: str
106
+ max_new_tokens: int = 2048
107
 
108
  app = FastAPI()
109
 
 
144
  print(f"Error during model loading: {e}")
145
  raise
146
 
147
+ def generate_response(model, tokenizer, instruction, max_new_tokens=2048):
148
  """Generate a response from the model based on an instruction."""
149
  try:
150
  # Format input for the model