CineMatch2.0 / libs /query.py
AshwinUnnikrishnan's picture
Making image search change to wikipedia
7369476
Raw History Blame Contribute Delete
493 Bytes
"""
Script contains the model loaded and respective functions with the model.
"""
import google.generativeai as genai
from config.config import MODEL, GOOGLE_API_KEY
model = genai.GenerativeModel(MODEL)
genai.configure(api_key=GOOGLE_API_KEY)
def get_answers(query):
'''
Function to query the model and get the answers.
:param query: a string containing search query.
:return: response from the model
'''
response = model.generate_content(query)
return response