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) | |