Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -13,8 +13,8 @@ async def initialize(file_path, question):
|
|
13 |
genai.configure(api_key=os.getenv("GOOGLE_API_KEY"))
|
14 |
model = genai.GenerativeModel('gemini-pro')
|
15 |
model = ChatGoogleGenerativeAI(model="gemini-pro", temperature=0.3)
|
16 |
-
prompt_template = """
|
17 |
-
|
18 |
Context: \n {context}?\n
|
19 |
Question: \n {question} \n
|
20 |
Answer:
|
|
|
13 |
genai.configure(api_key=os.getenv("GOOGLE_API_KEY"))
|
14 |
model = genai.GenerativeModel('gemini-pro')
|
15 |
model = ChatGoogleGenerativeAI(model="gemini-pro", temperature=0.3)
|
16 |
+
prompt_template = """Understand the question answer to the question as precise as possible using the provided context.
|
17 |
+
If the answer is not contained in the context, say "answer not available in context" \n\n
|
18 |
Context: \n {context}?\n
|
19 |
Question: \n {question} \n
|
20 |
Answer:
|