saritha commited on
Commit
37881ba
·
verified ·
1 Parent(s): 13dc352

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -42,6 +42,7 @@ def initialize(pdf_file, question):
42
  # Generate answer using GeminiPro model
43
  # Load the GeminiPro model
44
  model = genai.GenerativeModel('gemini-pro')
 
45
 
46
  # Ensure your LLM object (model) inherits from Runnable and can generate text
47
 
@@ -53,6 +54,7 @@ def initialize(pdf_file, question):
53
 
54
  # Generate the answer using load_qa_chain
55
  stuff_chain = load_qa_chain(model, chain_type="stuff", prompt=prompt)
 
56
  stuff_answer = stuff_chain(input_data, return_only_outputs=True)
57
 
58
  # Extract the answer
 
42
  # Generate answer using GeminiPro model
43
  # Load the GeminiPro model
44
  model = genai.GenerativeModel('gemini-pro')
45
+ model = ChatGoogleGenerativeAI(model="gemini-pro", temperature=0.3)
46
 
47
  # Ensure your LLM object (model) inherits from Runnable and can generate text
48
 
 
54
 
55
  # Generate the answer using load_qa_chain
56
  stuff_chain = load_qa_chain(model, chain_type="stuff", prompt=prompt)
57
+ stuff_chain = load_qa_chain(model, chain_type="stuff", prompt=prompt)
58
  stuff_answer = stuff_chain(input_data, return_only_outputs=True)
59
 
60
  # Extract the answer