Update qa_engine.py
Browse files- qa_engine.py +6 -2
qa_engine.py
CHANGED
@@ -2,10 +2,14 @@ import google.generativeai as genai
|
|
2 |
import os
|
3 |
|
4 |
# Configure the Gemini API
|
5 |
-
|
|
|
|
|
|
|
|
|
6 |
|
7 |
# Initialize the Gemini Pro model for text-based tasks
|
8 |
-
model = genai.GenerativeModel('gemini-
|
9 |
|
10 |
def get_answer(question, video_data):
|
11 |
prompt = f"""
|
|
|
2 |
import os
|
3 |
|
4 |
# Configure the Gemini API
|
5 |
+
import os
|
6 |
+
import google.generativeai as genai
|
7 |
+
|
8 |
+
os.environ["GOOGLE_API_KEY"] = "AIzaSyD0GxR2J1JxGic807Cc89Jq6MB4aDJYgDc"
|
9 |
+
genai.configure()
|
10 |
|
11 |
# Initialize the Gemini Pro model for text-based tasks
|
12 |
+
model = genai.GenerativeModel('gemini-1.5-flash')
|
13 |
|
14 |
def get_answer(question, video_data):
|
15 |
prompt = f"""
|