Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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=
|
| 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=
|
| 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)
|