Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -49,7 +49,7 @@ def search_reviews(df_original, product_description, without_newlines=False, n=1
|
|
| 49 |
def generate_response(text, model, temperature, top_p):
|
| 50 |
reference = search_reviews(data, text, without_newlines=True)["Content"][0]
|
| 51 |
|
| 52 |
-
completion = client.
|
| 53 |
engine=model,
|
| 54 |
prompt=f"Rewrite the following text while ensuring logical composition and avoiding over-exaggeration or imaginative elements: {reference}\n\n{text}",
|
| 55 |
temperature=temperature,
|
|
|
|
| 49 |
def generate_response(text, model, temperature, top_p):
|
| 50 |
reference = search_reviews(data, text, without_newlines=True)["Content"][0]
|
| 51 |
|
| 52 |
+
completion = client.completions.create(
|
| 53 |
engine=model,
|
| 54 |
prompt=f"Rewrite the following text while ensuring logical composition and avoiding over-exaggeration or imaginative elements: {reference}\n\n{text}",
|
| 55 |
temperature=temperature,
|