anmolsahai commited on
Commit
322dc90
1 Parent(s): a009d1d
Files changed (1) hide show
  1. langchain_pipeline.py +3 -3
langchain_pipeline.py CHANGED
@@ -6,11 +6,11 @@ from langchain_openai import OpenAIEmbeddings
6
  from langchain_anthropic import ChatAnthropic
7
  from langchain_google_genai import ChatGoogleGenerativeAI
8
  import base64
9
- from vertexai.generative_models import GenerativeModel, Part, FinishReason
10
- import vertexai.preview.generative_models as generative_models
11
 
12
  def generate(document_parts, prompt_text):
13
- vertexai.init(project="akroda", location="us-central1")
14
  model = GenerativeModel("gemini-1.5-pro-001")
15
  responses = model.generate_content(
16
  document_parts,
 
6
  from langchain_anthropic import ChatAnthropic
7
  from langchain_google_genai import ChatGoogleGenerativeAI
8
  import base64
9
+ from google.cloud.aiplatform.generative_models import GenerativeModel, Part, FinishReason
10
+ from google.cloud import aiplatform as generative_models
11
 
12
  def generate(document_parts, prompt_text):
13
+ aiplatform.init(project="akroda", location="us-central1")
14
  model = GenerativeModel("gemini-1.5-pro-001")
15
  responses = model.generate_content(
16
  document_parts,