Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -144,7 +144,7 @@ async def dynamic_few_shot_predict(text, n_examples=5):
|
|
| 144 |
messages = [
|
| 145 |
ChatMessage.from_str(dynamic_few_shot_prompt_tmpl.format(review=text, n_examples=n_examples))
|
| 146 |
]
|
| 147 |
-
response = await
|
| 148 |
return response.raw.rating
|
| 149 |
|
| 150 |
def classify(review, num_examples, api_key):
|
|
|
|
| 144 |
messages = [
|
| 145 |
ChatMessage.from_str(dynamic_few_shot_prompt_tmpl.format(review=text, n_examples=n_examples))
|
| 146 |
]
|
| 147 |
+
response = await structured_llm.achat(messages)
|
| 148 |
return response.raw.rating
|
| 149 |
|
| 150 |
def classify(review, num_examples, api_key):
|