dongsiqie commited on
Commit
4876ec3
·
1 Parent(s): 18fba96

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -9,8 +9,7 @@ from PIL import Image
9
 
10
  print("google-generativeai:", genai.__version__)
11
 
12
- # GOOGLE_API_KEY = os.environ.get("GOOGLE_API_KEY")
13
- GOOGLE_API_KEY = api_key_input
14
 
15
  TITLE = """<h1 align="center">Gemini Playground 💬</h1>"""
16
  SUBTITLE = """<h2 align="center">Play with Gemini Pro and Gemini Pro Vision API</h2>"""
@@ -153,7 +152,6 @@ chatbot_component = gr.Chatbot(
153
  scale=2,
154
  height=400
155
  )
156
- api_key_input = gr.Textbox(label="API Key", type="password", placeholder="Enter your API key", lines=1)
157
  text_prompt_component = gr.Textbox(
158
  placeholder="Hi there! [press Enter]", show_label=False, autofocus=True, scale=8
159
  )
@@ -279,4 +277,4 @@ with gr.Blocks() as demo:
279
  queue=False
280
  )
281
 
282
- demo.queue(max_size=99).launch(debug=False, show_error=True)
 
9
 
10
  print("google-generativeai:", genai.__version__)
11
 
12
+ GOOGLE_API_KEY = os.environ.get("GOOGLE_API_KEY")
 
13
 
14
  TITLE = """<h1 align="center">Gemini Playground 💬</h1>"""
15
  SUBTITLE = """<h2 align="center">Play with Gemini Pro and Gemini Pro Vision API</h2>"""
 
152
  scale=2,
153
  height=400
154
  )
 
155
  text_prompt_component = gr.Textbox(
156
  placeholder="Hi there! [press Enter]", show_label=False, autofocus=True, scale=8
157
  )
 
277
  queue=False
278
  )
279
 
280
+ demo.queue(max_size=99).launch(debug=False, show_error=True)