File size: 483 Bytes
8c85f53 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
import tensorflow as tf
import os
from datetime import datetime
from inference import Inference
products_path = os.path.join("products")
inference = Inference()
raw_query = {
'user_id': "new_user", # any user will be considered as a new user
'channel': 'Organic',
'device_type': 'Desktop',
'query_text': 'pizza',
'time': datetime.now().strftime("%Y-%m-%d %H:%M:%S.%f"), # querytime
}
inference.get_recommendations(raw_query)
print(inference.recommendations)
|