ZeyuXie commited on
Commit
5dbd795
1 Parent(s): cc04ad5

Update llm_preprocess.py

Browse files
Files changed (1) hide show
  1. llm_preprocess.py +4 -1
llm_preprocess.py CHANGED
@@ -4,6 +4,8 @@ At the command line, only need to run once to install the package via pip:
4
  $ pip install google-generativeai
5
  """
6
  import json
 
 
7
 
8
  def get_event():
9
  event_list = [
@@ -60,7 +62,8 @@ def postprocess(caption):
60
  def preprocess_gemini(free_text_caption):
61
  preffix_prompt = get_prompt()
62
  import google.generativeai as genai
63
- genai.configure(api_key="AIzaSyDfGKPQtS9qExCfl3bnfxC1rLPzvORz3E4")
 
64
 
65
  # Set up the model
66
  generation_config = {
 
4
  $ pip install google-generativeai
5
  """
6
  import json
7
+ import os
8
+
9
 
10
  def get_event():
11
  event_list = [
 
62
  def preprocess_gemini(free_text_caption):
63
  preffix_prompt = get_prompt()
64
  import google.generativeai as genai
65
+ GEMINI_API_KEY = os.environ["GEMINI_API_KEY"]
66
+ genai.configure(api_key=GEMINI_API_KEY)
67
 
68
  # Set up the model
69
  generation_config = {