NotASI commited on
Commit
bfff8f5
·
1 Parent(s): 2053de8

Updated app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -165,7 +165,7 @@ References:
165
  """
166
  GEMINI_API_KEY_NIGHTLY = os.getenv("GEMINI_API_KEY_NIGHTLY")
167
  model_nightly_name = "gemini-1.5-flash"
168
- model_nightly = genai.GenerativeModel(model_nightly_name)
169
  chat = model_nightly.start_chat(history=[])
170
 
171
  def transform_history(history):
@@ -260,9 +260,9 @@ with gr.Blocks(theme = gr.themes.Soft()) as demo:
260
  gr.ChatInterface(
261
  response,
262
  title = 'Gemini Chat',
263
- textbox = gr.Textbox(
264
- placeholder = "Chat with Gemini"
265
- ),
266
  retry_btn = None,
267
  undo_btn = None,
268
  clear_btn = None,
 
165
  """
166
  GEMINI_API_KEY_NIGHTLY = os.getenv("GEMINI_API_KEY_NIGHTLY")
167
  model_nightly_name = "gemini-1.5-flash"
168
+ model_nightly = genai.GenerativeModel(model_nightly_name, api_key=GEMINI_API_KEY_NIGHTLY)
169
  chat = model_nightly.start_chat(history=[])
170
 
171
  def transform_history(history):
 
260
  gr.ChatInterface(
261
  response,
262
  title = 'Gemini Chat',
263
+ # textbox = gr.Textbox(
264
+ # placeholder = "Chat with Gemini"
265
+ # ),
266
  retry_btn = None,
267
  undo_btn = None,
268
  clear_btn = None,