HaywhyCoder commited on
Commit
2d2fda6
·
verified ·
1 Parent(s): b206eda

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -9,8 +9,8 @@ import os
9
  """
10
  For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
11
  """
12
- GOOGLE_API_KEY = os.getenv("GOOGLE_API_KEY")
13
- client = genai.Client(api_key=GOOGLE_API_KEY)
14
 
15
  vis_llm = ChatGoogleGenerativeAI(model="gemini-2.0-flash-preview-image-generation")
16
 
@@ -105,4 +105,4 @@ with gr.Blocks() as app:
105
  bot_msg.then(lambda: gr.MultimodalTextbox(interactive=True), None, text_box)
106
 
107
  app.queue()
108
- app.launch()
 
9
  """
10
  For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
11
  """
12
+ if "GOOGLE_API_KEY" not in os.environ:
13
+ os.environ["GOOGLE_API_KEY"] = os.getenv("GOOGLE_API_KEY")
14
 
15
  vis_llm = ChatGoogleGenerativeAI(model="gemini-2.0-flash-preview-image-generation")
16
 
 
105
  bot_msg.then(lambda: gr.MultimodalTextbox(interactive=True), None, text_box)
106
 
107
  app.queue()
108
+ app.launch(sharing=True)