Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -48,7 +48,7 @@ def language_preprocess(text):
|
|
| 48 |
|
| 49 |
def relevant(product, similar_product, content):
|
| 50 |
try:
|
| 51 |
-
payload = {"inputs": f'''Do you think that the given content is similar to {similar_product} and {product}, just Respond True or False \nContent for similar product: {content}'''}
|
| 52 |
response = requests.post(API_URL, headers=headers, json=payload)
|
| 53 |
output = response.json()
|
| 54 |
return bool(output[0]['generated_text'])
|
|
|
|
| 48 |
|
| 49 |
def relevant(product, similar_product, content):
|
| 50 |
try:
|
| 51 |
+
payload = {"inputs": f'''Do you think that the given content is similar to {similar_product} and {product}, just Respond True or False \nContent for similar product: {content[:700]}'''}
|
| 52 |
response = requests.post(API_URL, headers=headers, json=payload)
|
| 53 |
output = response.json()
|
| 54 |
return bool(output[0]['generated_text'])
|