xen2003 commited on
Commit
f9db37e
·
verified ·
1 Parent(s): 55b1d7e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -87,7 +87,7 @@ def analyze_sentiment(text):
87
  {"role": "user", "content": text}
88
  ],
89
  temperature=0.0, # Control the randomness of the output (0.0 means deterministic output)
90
- max_tokens=10 # Limit the response length to 200 tokens
91
  )
92
 
93
  sentiment = response.choices[0].message.content
@@ -150,7 +150,7 @@ def analyze_sentiment_gpt(text):
150
  model=DEPLOYMENT_NAME_GPT, # Specify the model to be used for generating the completion
151
  messages=msg,
152
  temperature=0.0, # Control the randomness of the output (0.0 means deterministic output)
153
- max_tokens=10 # Limit the response length to 200 tokens
154
  )
155
  sentiment = response.choices[0].message.content
156
  #print(sentiment)
 
87
  {"role": "user", "content": text}
88
  ],
89
  temperature=0.0, # Control the randomness of the output (0.0 means deterministic output)
90
+ max_tokens=200 # Limit the response length to 200 tokens
91
  )
92
 
93
  sentiment = response.choices[0].message.content
 
150
  model=DEPLOYMENT_NAME_GPT, # Specify the model to be used for generating the completion
151
  messages=msg,
152
  temperature=0.0, # Control the randomness of the output (0.0 means deterministic output)
153
+ max_tokens=200 # Limit the response length to 200 tokens
154
  )
155
  sentiment = response.choices[0].message.content
156
  #print(sentiment)