sarath-shekkizhar commited on
Commit
2c3805a
1 Parent(s): fd397ae

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -9,7 +9,7 @@ from openai import OpenAI, APIError
9
 
10
  client = OpenAI(
11
  base_url="https://hjopms3xd7gembdu.us-east-1.aws.endpoints.huggingface.cloud/v1/",
12
- api_key="hf_XXXXX"
13
  )
14
 
15
  MAX_MAX_NEW_TOKENS = 2048
@@ -46,7 +46,7 @@ def generate(
46
  )
47
  outputs = []
48
  for chunk in response:
49
- outputs.append(chunk.choices[0].delta.content)
50
  yield "".join(outputs)
51
 
52
  except APIError as e:
 
9
 
10
  client = OpenAI(
11
  base_url="https://hjopms3xd7gembdu.us-east-1.aws.endpoints.huggingface.cloud/v1/",
12
+ api_key=""
13
  )
14
 
15
  MAX_MAX_NEW_TOKENS = 2048
 
46
  )
47
  outputs = []
48
  for chunk in response:
49
+ outputs.append(chunk.choices[0].delta.content.strip("<|eot_id|>"))
50
  yield "".join(outputs)
51
 
52
  except APIError as e: